FEniCS Course - FEniCS Project
FEniCS Course - FEniCS Project
FEniCS Course - FEniCS Project
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Implementing the variational problemdt = 0.3u0 = project (g, V)u1 = Function (V)u = TrialFunction (V)v = TestFunction (V)f = Constant ( beta - 2 - 2* alpha )a = u*v*dx + dt* inner ( grad (u), grad (v))*dxL = u0*v*dx + dt*f*v*dxbc = DirichletBC (V, g, " on_boundary ")# assemble only once , before time - steppingA = assemble (a)11 / 13