# Copyright (C) 2008 Kristian B. Oelgaard # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # DOLFIN 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with DOLFIN. If not, see . # # First added: 2008-05-05 # Last changed: 2008-05-05 from ufl_legacy import (Coefficient, dot, dx, FiniteElement, triangle, TestFunction, TrialFunction) DG = FiniteElement("Discontinuous Lagrange", triangle, 1) CG = FiniteElement("Lagrange", triangle, 1) # Test and trial functions v = TestFunction(CG) phi = TrialFunction(CG) phi0 = Coefficient(DG) a = dot(v, phi)*dx L = dot(v, phi0)*dx