From 4b85f4532c34138678698c21c65e7a2bc8af7ce3 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Fri, 3 Feb 2017 16:50:13 +0100
Subject: [PATCH] Apply CSE in the applications

---
 applications/convection_diffusion/conv_diff_dg.ufl | 10 +++++-----
 applications/poisson_dg/poisson_dg.ufl             | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/applications/convection_diffusion/conv_diff_dg.ufl b/applications/convection_diffusion/conv_diff_dg.ufl
index d3c95a52..00267f15 100644
--- a/applications/convection_diffusion/conv_diff_dg.ufl
+++ b/applications/convection_diffusion/conv_diff_dg.ufl
@@ -16,20 +16,20 @@ n = FacetNormal(cell)('+')
 
 alpha = 3.0
 h_ext = CellVolume(cell) / FacetArea(cell)
-gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext
+cse_gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext
 h_int = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell)
-gamma_int = (alpha * degree * (degree + dim - 1)) / h_int
+cse_gamma_int = (alpha * degree * (degree + dim - 1)) / h_int
 
 theta = -1.0
 
 r = (inner(A*grad(u), grad(v)) + (c*u-f)*v)*dx \
   + inner(n, A*avg(grad(u)))*jump(v)*dS \
-  + gamma_int*jump(u)*jump(v)*dS \
+  + cse_gamma_int*jump(u)*jump(v)*dS \
   - theta*jump(u)*inner(A*avg(grad(v)), n)*dS \
   - inner(n, A*grad(u))*v*ds \
-  + gamma_ext*u*v*ds \
+  + cse_gamma_ext*u*v*ds \
   + theta*u*inner(A*grad(v), n)*ds \
   - theta*g*inner(A*grad(v), n)*ds \
-  - gamma_ext*g*v*ds
+  - cse_gamma_ext*g*v*ds
 
 forms = [r]
diff --git a/applications/poisson_dg/poisson_dg.ufl b/applications/poisson_dg/poisson_dg.ufl
index 7b5c3e54..2c0f2c34 100644
--- a/applications/poisson_dg/poisson_dg.ufl
+++ b/applications/poisson_dg/poisson_dg.ufl
@@ -12,21 +12,21 @@ n = FacetNormal(cell)('+')
 
 alpha = 1.0
 h_ext = CellVolume(cell) / FacetArea(cell)
-gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext
+cse_gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext
 h_int = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell)
-gamma_int = (alpha * degree * (degree + dim - 1)) / h_int
+cse_gamma_int = (alpha * degree * (degree + dim - 1)) / h_int
 
 theta = -1.0
 
 r = inner(grad(u), grad(v))*dx \
   + inner(n, avg(grad(u)))*jump(v)*dS \
-  + gamma_int*jump(u)*jump(v)*dS \
+  + cse_gamma_int*jump(u)*jump(v)*dS \
   - theta*jump(u)*inner(avg(grad(v)), n)*dS \
   - inner(n, grad(u))*v*ds \
-  + gamma_ext*u*v*ds \
+  + cse_gamma_ext*u*v*ds \
   + theta*u*inner(grad(v), n)*ds \
   - f*v*dx \
   - theta*g*inner(grad(v), n)*ds \
-  - gamma_ext*g*v*ds
+  - cse_gamma_ext*g*v*ds
 
 forms = [r]
-- 
GitLab