# HG changeset patch # User Eugenio Gianniti # Date 1403621749 -7200 # Node ID cb6f11a0966709e8b9c251611278df68be2ce2b7 # Parent b96f6b12f8cabf7b6c838a7f18aafaa8254a6a4e Move ufl to m-file in Evolution example diff -r b96f6b12f8ca -r cb6f11a09667 inst/example/Evolution/Evolution.m --- a/inst/example/Evolution/Evolution.m Tue Jun 24 16:43:13 2014 +0200 +++ b/inst/example/Evolution/Evolution.m Tue Jun 24 16:55:49 2014 +0200 @@ -15,8 +15,22 @@ pkg load fem-fenics msh +ufl start Evolution +ufl 'element = FiniteElement("Lagrange", triangle, 1)' +ufl +ufl u = TrialFunction(element) +ufl v = TestFunction(element) +ufl +ufl u0 = Coefficient(element) +ufl +ufl dt = Constant(triangle) +ufl +ufl eq = (1/dt)*(u-u0)*v*dx + "inner(grad(u), grad(v))*dx" +ufl a = rhs (eq) +ufl L = lhs (eq) +ufl end + problem = 'Evolution'; -import_ufl_Problem (problem); mesh = Mesh (msh2m_structured_mesh (0:0.05:1, 0:0.05:1, 1, 1:4)); diff -r b96f6b12f8ca -r cb6f11a09667 inst/example/Evolution/Evolution.ufl --- a/inst/example/Evolution/Evolution.ufl Tue Jun 24 16:43:13 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -## Copyright (C) 2013 Marco Vassallo -## -## 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 . - -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)