Change orthogonalization option in fortran?
Barry Smith
bsmith at mcs.anl.gov
Fri Nov 20 13:07:35 CST 2009
Sorry, we don't have the Fortran interfaces for these operations.
You can use
call PetscOptionsSet("-
ksp_gmres_classicalgramschmidt",PETSC_NULL_CHARACTER,ierr)
call PetscOptionsSet("-
ksp_gmres_cgs_refinement_type","REFINE_IFNEEDED",ierr)
before creating the KSP object.
Barry
On Nov 19, 2009, at 1:14 PM, hxie at umn.edu wrote:
> Hi,
>
> I want to change the method for orthogonalization for the default
> ksp solver in fortran. I added the following in my code:
> --------------
> call
> KSPGMRESSetOrthogonalization
> (ksp,KSPGMRESClassicalGramSchmidtOrthogonalization,pterr)
> call
> KSPGMRESSetCGSRefinementType
> (ksp,KSP_GMRES_CGS_REFINEMENT_IFNEEDED,pterr)
> --------------
>
> And I got the following error message when compiling.
> --------------
> error #6404: This name does not have a type, and must have an
> explicit type. [KSPGMRESCLASSICALGRAMSCHMIDTORTHOGONALIZATI]
> call
> KSPGMRESSetOrthogonalization
> (ksp,KSPGMRESClassicalGramSchmidtOrthogonalization,pterr)
>
> error #6404: This name does not have a type, and must have an
> explicit type. [KSP_GMRES_CGS_REFINEMENT_IFNEEDED]
> call
> KSPGMRESSetCGSRefinementType
> (ksp,KSP_GMRES_CGS_REFINEMENT_IFNEEDED,pterr)
> --------------
>
> If I comment these two lines, the code is OK. Any idea for this?
> Thanks.
>
> Bests,
> Hui
More information about the petsc-users
mailing list