[petsc-users] Is there any counterpart of TSSetMatrices in petsc4py?

Lisandro Dalcin dalcinl at gmail.com
Wed Aug 15 12:45:06 CDT 2012


On 15 August 2012 14:13, Xin Zhao <sean.null at gmail.com> wrote:
> Dear all,
>
> What I need is just to solve a very easy linear ODE.
>
> u_t = Au
>
> A is sparse and constant.
>
> But I didn't find a counterpart of TSSetMatrices in petsc4py for this.
> It is strange because petsc4py can handle much harder problems.
>

TSSetMatrices() is no longer supported in petsc-3.3. You have to
rewrite your problem in implicit nonlinear form, and ask TS to solve a
linear problem. You still have to code your IFunction and IJacobian in
Python, use the PETSc C implementations TSComputeIFunctionLinear() and
TSComputeIJacobianConstant() and translate to Python.


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


More information about the petsc-users mailing list