[petsc-users] Can a MatShell that operates on ghosted vectors work in place?

Toby Isaac tisaac at ices.utexas.edu
Mon Aug 20 09:49:18 CDT 2012


 I have finite element code, developed outside of PETSc thus far, with 
 matrix-free operators.  I've written the operators so that they expect 
 ghosted input vectors and return ghosted output vectors.

 I know that I can write a MatShell that creates a temporary ghosted 
 versions of the input Vec and output Vec and calls my operators on 
 these.  What I want to know is if there is any way to work in place, 
 i.e. write a MatShell that expects ghosted inputs/outputs.  This would 
 also require KSP methods to work with ghosted vectors and only use the 
 locally-owned variables in the dot products.

 Thanks,
 Toby


More information about the petsc-users mailing list