PCShellSetContext fortran interface

Stephan Kramer stephan.kramer at imperial.ac.uk
Thu Jun 7 11:44:24 CDT 2007


Hi,

I don't know if this is the expected behaviour but calling PCShellSetContext 
from fortran, the thing that is stored is not the integer value of context, 
but the pointer to this integer. Thus problems arise when supplying an 
integer variable that goes out of scope (e.g. on the stack) inbetween 
PCShellSetContext and the call to the 'apply shell preconditioner' routine. I 
know this makes sense from the C point of view, where you are merely 
supplying a void pointer, but this is not what you expect in Fortran were the 
only use of context could be as a reference/index itself to another object, 
and you thus expect the value of context to be stored.

Cheers
Stephan Kramer




More information about the petsc-users mailing list