Re: [petsc-users] How to manually set the matrix-free differencing parameter h?

2017-05-23 Thread Ping He
, at 12:09 PM, Ping He <friede...@gmail.com> wrote: Hi, I am using PETSc-SNES matrix free approach, and I would like to know how to manually set the differencing parameter h. I tried to use the SNESDefaultMatrixFreeSetParameters2 function but I got an error when com

[petsc-users] How to manually set the matrix-free differencing parameter h?

2017-05-23 Thread Ping He
Hi, I am using PETSc-SNES matrix free approach, and I would like to know how to manually set the differencing parameter h. I tried to use the SNESDefaultMatrixFreeSetParameters2 function but I got an error when compiling: ‘SNESDefaultMatrixFreeSetParameters2’ was not declared in this scope.

Re: [petsc-users] SNES diverges when KSP reach max iteration?

2017-04-10 Thread Ping He
It works. Thanks! On 04/10/2017 03:14 PM, Barry Smith wrote: SNESSetMaxLinearSolveFailures() or -snes_max_linear_solve_fail 1000 (use some large number here). On Apr 10, 2017, at 1:22 PM, Ping He <friede...@gmail.com> wrote: Dear all, I am using SNES for an incompressible flow p

Re: [petsc-users] How to use class function in SNESSetFunction

2017-03-20 Thread Ping He
Dear Matt, I know it is an old thread and your solution works well, but I still want to ask if there are any alternative instead of setting the member function "static". The issue is that I need to use multiple member functions (20+) in SNESSetFunction and numerous class variables. So