Dear all,

 

I have a lot of coefficients in my form, e.g.

1)  Calculate density rhow pointwise from temperature and pressure via interpolation of a table

rhow = Function(DG1)

rhow.dat.data[:]=calc_rhow(temp,Tsat,pw)

2)  Averaging

rhow_avg = (rhow('+') + rhow('-')) / 2.0

3)  Use rhow_avg in my form.

 

This works all right for calulcating F(u), but fails when computing the Jacobian. Since I calculate things pointwise and providing all the derivatives is not so easy I use –snes_fd_color.

 

What I would want to happen is that the function calc_rhow is called every time rhow_avg is needed. This seems not to be the case. Rather the coefficient is assumed constant and thus the derivative is zero.

How can I make sure that the function calc_rhow is called every time I need rhow_avg?

Thank you!

Henrik

 

 

 

 

 

 

--

Dipl.-Math. Henrik Büsing

Institute for Applied Geophysics and Geothermal Energy

E.ON Energy Research Center

RWTH Aachen University

------------------------------------------------------

Mathieustr. 10            |    Tel +49 (0)241 80 49907

52074 Aachen, Germany     |    Fax +49 (0)241 80 49889

------------------------------------------------------

http://www.eonerc.rwth-aachen.de/GGE

hbuesing@eonerc.rwth-aachen.de

------------------------------------------------------