KSP quick question

Barry Smith bsmith at mcs.anl.gov
Thu Sep 10 15:12:34 CDT 2009


On Sep 10, 2009, at 1:32 PM, Matthew Knepley wrote:

> 2009/9/10 tsjb00 <tsjb00 at hotmail.com>
> Hi! I have a quick question about KSP solvers. I will use the KSP  
> solver to solve a time varying problem. My question is: do I need to  
> call the following functions once in initialization, or do I need to  
> call them in the time loop (solving equations in each time step)?
>
> The functions I am not sure about include:
> KSPSetOperators
>
>  ^^^^^ This is the only one to call in the loop.

     This assumes that matrix is changing with time. If the matrix is  
fixed then you do not need to call this more than once.

   Barry

>
>   Matt
>
> KSPGetPC
> PCSetType
> KSPSetType
> KSPSetFromOptions
>
> Many thanks!
> 聊天+搜索+邮箱 想要轻松出游,手机MSN帮你搞定! 立刻下载!
> -- 
> What most experimenters take for granted before they begin their  
> experiments is infinitely more interesting than any results to which  
> their experiments lead.
> -- Norbert Wiener



More information about the petsc-users mailing list