~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to sandbox/eval/Projection.form

  • Committer: Anders Logg
  • Date: 2008-03-17 14:59:22 UTC
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: logg@simula.no-20080317145922-83cfli6k6ev22qu7
Implement evaluation of Functions at arbitrary points.
Now, f.eval(x) works for any x inside the mesh. Broken
in Python since FFC does not generate evaluate_basis
by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2008 Anders Logg.
 
2
# Licensed under the GNU LGPL Version 2.1.
 
3
#
 
4
# First added:  2008-03-17
 
5
# Last changed: 2008-03-17
 
6
#
 
7
# The bilinear form a(v, u) and linear form L(v) for
 
8
# projection onto piecewise quadratics.
 
9
#
 
10
# Compile this form with FFC: ffc -l dolfin Projection.form.
 
11
 
 
12
element = FiniteElement("Lagrange", "tetrahedron", 2)
 
13
 
 
14
v = TestFunction(element)
 
15
u = TrialFunction(element)
 
16
f = Function(element)
 
17
 
 
18
a = v*u*dx
 
19
L = v*f*dx