[petsc-users] [petsc4py] a problem with computeRHSFunctionLinear interface?
Francesco Caimmi
francesco.caimmi at polimi.it
Thu Aug 11 02:36:39 CDT 2016
Dear all,
I was trying to reproduce /ts/examples/tutorials/ex4.c in python to learn how
to use TS solvers; the example uses the function TSComputeRHSFunctionLinear.
However I get an error when running my code (attached in case you want to look
at it), when I call ts.solve.
Here is the trace:
[fcaimmi at Wotan 2645] > ./ts_ex4.py
Solving a linear TS problem, number of processors = 1
Timestep 0 : time = 0.0 2-norm error = 1.14956855594e-08 max norm error = 0
Traceback (most recent call last):
File "./ts_ex4.py", line 473, in <module>
main(m = m, debug = debug)
File "./ts_ex4.py", line 340, in main
ts.solve(u)
File "PETSc/TS.pyx", line 568, in petsc4py.PETSc.TS.solve
(src/petsc4py.PETSc.c:188927)
File "PETSc/petscts.pxi", line 221, in petsc4py.PETSc.TS_RHSFunction
(src/petsc4py.PETSc.c:35490)
File "PETSc/TS.pyx", line 189, in petsc4py.PETSc.TS.computeRHSFunctionLinear
(src/petsc4py.PETSc.c:181611)
TypeError: computeRHSFunctionLinear() takes exactly 3 positional arguments (5
given)
I cannot understand if there is a problem with my code or if the problem is in
computeRHSFunctionLinear interface.
I checked https://bitbucket.org/petsc/petsc4py/ and the interface to
computeRHSFunctionLinear has three arguments, however I am not that much into
petsc4py to tell how it gets called.
I am on Petsc Release Version 3.7.3
Thank you for your time.
Best,
--
Francesco Caimmi
Laboratorio di Ingegneria dei Polimeri
http://www.chem.polimi.it/polyenglab/
Politecnico di Milano - Dipartimento di Chimica,
Materiali e Ingegneria Chimica “Giulio Natta”
P.zza Leonardo da Vinci, 32
I-20133 Milano
Tel. +39.02.2399.4711
Fax +39.02.7063.8173
francesco.caimmi at polimi.it
Skype: fmglcaimmi (please arrange meetings by e-mail)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ts_ex4.py
Type: text/x-python
Size: 15136 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160811/740f60d5/attachment.py>
More information about the petsc-users
mailing list