[e85390]: / inst / example / Evolution / Evolution.ufl  Maximize  Restore  History

Download this file

28 lines (22 with data), 959 Bytes

## Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net>
##
## This program is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free Software
## Foundation; either version 3 of the License, or (at your option) any later
## version.
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
## details.
##
## You should have received a copy of the GNU General Public License along with
## this program; if not, see <http://www.gnu.org/licenses/>.

element = FiniteElement("Lagrange", triangle, 1)

u = TrialFunction(element)
v = TestFunction(element)

u0 = Coefficient(element)

dt = Constant(triangle)

eq = (1/dt)*(u-u0)*v*dx + inner(grad(u), grad(v))*dx
a = rhs (eq)
L = lhs (eq)