dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20566
Re: [Question #139887]: how can I change boundaryconditions asfunction oftime?
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.