> On Dec 20, 2016, at 10:50 AM, Ji Zhang <[email protected]> wrote:
> 
> Dear all, 
> 
> I'm a petsc user. Currently, the system I face is so huge that is out of 
> memory. I want to perform fast multipole method using petsc. Is it possible 
> for me to tell the solver the result of matrix-vector product, which is gmres 
> need indeed, instead of generate the whole matrix directly?


   Absolutely. 

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateShell.html
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatShellSetOperation.html

follow the examples links for some simple examples.

  Barry

> For example, give a function headle to the solver. 
> 
> Thanks. 
>  
> 此致
>     敬礼
> 张骥(博士研究生)
> 北京计算科学研究中心 
> 北京市海淀区西北旺东路10号院东区9号楼 (100193)
> 
> Best, 
> Regards, 
> Zhang Ji, PhD student
> Beijing Computational Science Research Center 
> Zhongguancun Software Park II, No. 10 Dongbeiwang West Road, Haidian 
> District, Beijing 100193, China 

Reply via email to