Question #139887 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/139887
Status: Open => Answered Garth Wells proposed the following answer: Here's a complete example: from dolfin import * from numpy import array g = Expression("0.0 + 1.0/(1 + exp(10*(x[0]-t)))") T = 1.0 dt = 0.1 t = 0.0 while t < T: t += dt g.t = t x = array([0.3, 0.3, 0.3]) print g(x) -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp