# Copyright (c) 2005 Johan Hoffman 
# Licensed under the GNU GPL Version 2
#
# Modified by Anders Logg 2006
#
# First added:  2005
# Last changed: 2006-03-28
#
# The contiuity equation for the incompressible 
# Navier-Stokes equations using cG(1)cG(1)
#
# Compile this form with FFC: ffc NSEContinuity2D.form.

name = "NSEContinuity2D"
scalar = FiniteElement("Lagrange", "triangle", 1)
vector = VectorElement("Lagrange", "triangle", 1)
constant_scalar = FiniteElement("Discontinuous Lagrange", "triangle", 0)

q  = TestFunction(scalar)  # test basis function
P  = TrialFunction(scalar) # trial basis function
uc = Function(vector)      # linearized velocity

delta1 = Function(constant_scalar) # stabilization parameter

i0 = Index() # index for tensor notation
i1 = Index() # index for tensor notation

# Bilinear and linear forms
a = delta1*dot(grad(q), grad(P))*dx;
L = - q*div(uc)*dx  

