On Tue, Jul 31, 2012 at 11:16 AM, Daniel Wheeler
<[email protected]>wrote:

> On Mon, Jul 30, 2012 at 10:58 PM, Daniel Farrell <[email protected]>wrote:
>
>>
>>
> Just use what you have written. Should work as is. Actually, it should be
>
>     numpy.exp( -scipy.quad( lambda x: phi([[x]]), 0, x)[0] )
>
> if phi is a cell variable. The __call__ method of cell variable is used to
> pass in an array of positions of shape (dim, numberOfPositions) and then
> the returned array with shape (numberOfPositions,) is the interpolated
> value of the cell variable at the given positions.
>

This might be crazy slow if this is done point by point. Might be better to
create the interpolated phi array beforehand in one shot and then do the
integral.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to