~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to demo/pde/lift-drag/cpp/Lift.form

  • Committer: Johannes Ring
  • Date: 2008-03-05 22:43:06 UTC
  • Revision ID: johannr@simula.no-20080305224306-2npsdyhfdpl2esji
The BIG commit!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2007 Anders Logg.
 
2
# Licensed under the GNU LGPL Version 2.1.
 
3
#
 
4
# First added:  2007-05-14
 
5
# Last changed: 2007-05-14
 
6
#
 
7
# This form defines the functional for computing the
 
8
# lift on a body.
 
9
#
 
10
# Compile this form with FFC: ffc -l dolfin Lift.form.
 
11
 
 
12
element = FiniteElement("Lagrange", "triangle", 1)
 
13
 
 
14
p = Function(element)
 
15
n = FacetNormal("triangle")
 
16
M = p*n[1]*ds