[petsc-users] question about KSPSetOperators
    Barry Smith 
    bsmith at mcs.anl.gov
       
    Fri Feb 27 05:31:59 CST 2015
    
    
  
  Yes, see MatCreateShell() and MatShellSetOperation()
  Barry
> On Feb 27, 2015, at 3:42 AM, Sun, Hui <hus003 at ucsd.edu> wrote:
> 
> For KSPSetOperators or KSPSetComputeOperators, one needs to define the matrix. Now, instead of specifying the matrix, is it possible to define a linear operator, say LinearOperator(Vec input, &Vec output), and set it to be the KSP operator? 
> 
> Thank you. 
> Hui
    
    
More information about the petsc-users
mailing list