Hello everyone, is it possible to set initial conditions like this? For example, the wave equation needs two initial conditions
u0 = Expression('-8*sin(pi*x[0])/(pi*pi*pi)', '-8*cos(pi*x[0])/(pi*pi)', degree=3)
Hello everyone, is it possible to set initial conditions like this? For example, the wave equation needs two initial conditions
u0 = Expression('-8*sin(pi*x[0])/(pi*pi*pi)', '-8*cos(pi*x[0])/(pi*pi)', degree=3)
Define your function for the previous time step (the one you use in the variational form, Lets call it u_prev
). Then call u_prev.interpolate(u0)