[petsc-dev] Errors with DM & PCSHELL
Mark Adams
mfadams at lbl.gov
Fri May 29 10:32:30 CDT 2015
I am getting errors in code that I thought was working ...
I create a PC shell like so:
! set shell PC
call SNESGetKSP(solver%snes,innerksp,ierr)
call KSPGetPC(innerksp,spc,ierr)
call PCSetType(spc,PCSHELL,ierr) ! overriding opions !!!
call PCShellSetApply(spc,PCShermanMorrisonApply,ierr)
call PCSetApplicationContext(spc,solver,ierr)
and in PCShermanMorrisonApply I have:
call PCGetApplicationContext(pc,solver,ierr)
call
DMCompositeGetAccessArray(solver%da,xin,itwo,PETSC_NULL_INTEGER,Xsub,ierr)
call
DMCompositeGetAccessArray(solver%da,yout,itwo,PETSC_NULL_INTEGER,Ysub,ierr)
call PCFieldSplitGetSubKSP(solver%pc,PETSC_NULL_INTEGER,subksp,ierr)
call KSPSolve(subksp(1),Xsub(1),Ysub(1),ierr)
call MatMult(solver%Cmat,Ysub(1),Xsub(2),ierr) ! ignoring <> input
I get an error on this last statement about a vector being locked. There
does not seem to be:
call DMCompositeGetAccessArrayRead( ...
I thought I fixed this problem ... or at least one like it.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150529/0e5bf02c/attachment.html>
More information about the petsc-dev
mailing list