<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello PETSc experts,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am using VecNest to solve a Stokes problem and I ran into an issue using the POD KSPGuess routines:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
<div>[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing package: https://petsc.org/release/install/install/#external-packages</div>
<div>[0]PETSC ERROR: Unknown vector type: nest</div>
<div>[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.17.0, Mar 30, 2022 </div>
<div>[0]PETSC ERROR: /[...]/step-32/step-32 on a named mitral by drwells Fri Aug 19 16:33:08 2022</div>
<div>[0]PETSC ERROR: Configure options [...]</div>
<div>[0]PETSC ERROR: #1 VecSetType() at /afs/cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/vec/vec/interface/vecreg.c:80</div>
<div>[0]PETSC ERROR: #2 KSPGuessSetUp_POD() at /afs/cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/guess/impls/pod/pod.c:118</div>
<div>[0]PETSC ERROR: #3 KSPGuessSetUp() at /afs/cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/iguess.c:352</div>
<div>[0]PETSC ERROR: #4 KSPSolve_Private() at /afs/cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:830</div>
<div>[0]PETSC ERROR: #5 KSPSolve() at /afs/cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:1078</div>
<div><br>
</div>
<div><br>
</div>
<div>It looks like VecGetType() works with VecNest while VecSetType() does not. I also noticed that VecNest isn't listed in VecRegisterAll().</div>
<div><br>
</div>
<div>I think I can write a patch to make the POD KSPGuess work with VecNest, but: should VecSetType() work with VecNest? It seems like this is an oversight but I'd like to know if there is some fundamental reason why the sequence used there</div>
<div><br>
</div>
<div> PetscCall(KSPCreateVecs(guess->ksp,1,&v,0,NULL));
<div> PetscCall(VecCreate(PETSC_COMM_SELF,&vseq));</div>
<div> PetscCall(VecGetLocalSize(v[0],&n));</div>
<div> PetscCall(VecSetSizes(vseq,n,n));</div>
<div> PetscCall(VecGetType(v[0],&type));</div>
<div> PetscCall(VecSetType(vseq,type));</div>
<div> PetscCall(VecDestroyVecs(1,&v));</div>
<div> PetscCall(VecDuplicateVecs(vseq,pod->maxn,&pod->xsnap));</div>
<div> PetscCall(VecDestroy(&vseq));</div>
<div> PetscCall(PetscLogObjectParents(guess,pod->maxn,pod->xsnap));</div>
</div>
<div><br>
</div>
<div>can't work.</div>
<div><br>
</div>
<div>Best,</div>
<div>David Wells<br>
</div>
<br>
</div>
</body>
</html>