Passig NULL argument

Issue #21 resolved
Former user created an issue

Hello,

First of all thank you for providing petsc4py ! I have been using PETSc for three years and I have discovered recently petsc4py and I find it great !

However, there is something that I do not manage to do. I would would to solve the problem: u_t = A u. When using PETSc, it is necessary to call:

TSSetProblemType(ts,TS LINEAR);
TSSetRHSFunction(ts,NULL,TSComputeRHSFunctionLinear,NULL);
TSSetRHSJacobian(ts,A,A,TSComputeRHSJacobianConstant,NULL);

So in petsc4py, the second line is translated into:

ts.setRHSFunction(ts.computeRHSFunctionLinear,ARGUMENT)

but I do not know how to set ARGUMENT. I would like to pass NULL as in the code shown above, how can I do that in petsc4py ?

Thanks,

Lucas

Comments (2)

  1. Log in to comment