#!/usr/bin/env python

# Copyright (C) 2005 Anders Logg (logg@simula.no)
# Licensed under the GNU GPL version 3 or any later version

import profile
import pstats
import sys
sys.path.append("../")
sys.path.append("../../")
from ffc.compiler.compiler import *

dx = Integral("interior")
i  = Index()
j  = Index()

name = "NavierStokes"
element = FiniteElement("Vector Lagrange", "tetrahedron", 1)

v = BasisFunction(element)
u = BasisFunction(element)
w = Function(element)

a = v[i]*w[j]*u[i].dx(j)*dx
#a = v[i]*u[i]*dx

profile.run('compile(a, name, "")', 'profile.log')
p = pstats.Stats('profile.log')
p.sort_stats('time').print_stats(20)
