File: MetaData.ufl

package info (click to toggle)
ffc 0.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 31,928 kB
  • ctags: 5,610
  • sloc: cpp: 200,834; python: 14,417; perl: 351; makefile: 21; sh: 6
file content (23 lines) | stat: -rw-r--r-- 927 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright (C) 2009 Kristian B. Oelgaard (k.b.oelgaard@tudelft.nl)
# Licensed under the GNU GPL version 3 or any later version
#
# Test form for metadata
#
# Compile this form with FFC: ffc MetaData.ufl

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

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

# Three terms on the same subdomain using different representations
a_0 = v*u*dx(0, {"representation":"tensor"})\
    + inner(grad(v), grad(u))*dx(0, {"representation": "quadrature"})\
    + inner(grad(v), grad(u))*dx(0, {"representation": "auto"})

# Three terms on different subdomains using different representations and order
a_1 = inner(grad(v), grad(u))*dx(0, {"representation":"tensor", "quadrature_degree":8})\
    + inner(grad(v), grad(u))*dx(1, {"representation":"quadrature", "quadrature_degree":4})\
    + inner(grad(v), grad(u))*dx(1, {"representation":"auto", "quadrature_degree":"auto"})

a = a_0 + a_1