From c060718c7734404993ef10a8a14f1497af351d85 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Fri, 12 Jan 2018 16:06:16 +0100
Subject: [PATCH] dirichlet_expression -> interpolate_expression

There is way more reasons to interpolate a function into the
solution vector and we cover them with one code path:
* Dirichlet boundary conditions (strong ones)
* Initial conditions for instationary expressions
* Initial guesses for Newton solvers
---
 python/dune/perftool/compile.py                     |  2 +-
 python/dune/perftool/pdelab/driver/__init__.py      |  5 ++++-
 python/dune/perftool/pdelab/driver/instationary.py  |  2 +-
 python/dune/perftool/pdelab/driver/interpolate.py   | 13 +++----------
 test/blockstructured/nonlinear/nonlinear.ufl        |  2 +-
 test/blockstructured/poisson/3d/poisson.ufl         |  2 +-
 test/blockstructured/poisson/poisson.ufl            |  2 +-
 test/blockstructured/poisson/poisson_neumann.ufl    |  2 +-
 test/blockstructured/poisson/poisson_tensor.ufl     |  2 +-
 test/blockstructured/stokes/stokes.ufl              |  2 +-
 test/heatequation/heatequation.ufl                  |  2 +-
 test/heatequation/heatequation_dg.ufl               |  2 +-
 .../heatequation/heatequation_time_dependent_bc.ufl |  2 +-
 test/hyperbolic/linearacoustics.ufl                 |  2 +-
 test/hyperbolic/lineartransport.ufl                 |  2 +-
 test/hyperbolic/shallowwater.ufl                    |  2 +-
 test/nonlinear/diffusivewave.ufl                    |  2 +-
 test/nonlinear/nonlinear.ufl                        |  2 +-
 .../poisson_1d_cg_interval.ufl                      |  2 +-
 .../poisson_2d_cg_quadrilateral.ufl                 |  2 +-
 .../poisson_2d_cg_triangle.ufl                      |  2 +-
 .../poisson_3d_cg_hexahedron.ufl                    |  2 +-
 .../poisson_3d_cg_tetrahedron.ufl                   |  2 +-
 test/poisson/poisson.ufl                            |  2 +-
 test/poisson/poisson_neumann.ufl                    |  2 +-
 test/poisson/poisson_tensor.ufl                     |  2 +-
 test/stokes/stokes.ufl                              |  2 +-
 test/stokes/stokes_3d_quadrilateral.ufl             |  2 +-
 test/stokes/stokes_quadrilateral.ufl                |  2 +-
 test/stokes/stokes_stress.ufl                       |  2 +-
 test/stokes/stokes_stress_sym.ufl                   |  2 +-
 test/stokes/stokes_sym.ufl                          |  2 +-
 test/sumfact/hyperbolic/linearacoustics.ufl         |  2 +-
 test/sumfact/hyperbolic/lineartransport.ufl         |  2 +-
 test/sumfact/hyperbolic/shallowwater.ufl            |  2 +-
 test/sumfact/poisson/poisson_2d.ufl                 |  2 +-
 test/sumfact/poisson/poisson_3d.ufl                 |  2 +-
 test/sumfact/stokes/stokes.ufl                      |  2 +-
 38 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/python/dune/perftool/compile.py b/python/dune/perftool/compile.py
index cd5344c0..f55ec87c 100644
--- a/python/dune/perftool/compile.py
+++ b/python/dune/perftool/compile.py
@@ -92,7 +92,7 @@ def read_ufl(uflfile):
     if get_option("exact_solution_expression"):
         data.object_by_name[get_option("exact_solution_expression")] = namespace[get_option("exact_solution_expression")]
 
-    magic_names = ("dirichlet_expression",
+    magic_names = ("interpolate_expression",
                    "is_dirichlet",
                    "exact_solution",
                    )
diff --git a/python/dune/perftool/pdelab/driver/__init__.py b/python/dune/perftool/pdelab/driver/__init__.py
index e052fa95..04912744 100644
--- a/python/dune/perftool/pdelab/driver/__init__.py
+++ b/python/dune/perftool/pdelab/driver/__init__.py
@@ -192,8 +192,11 @@ def unroll_list_tensors(data):
             yield e
 
 
-def preprocess_leaf_data(element, data):
+def preprocess_leaf_data(element, data, applyZeroDefault=True):
     data = get_object(data)
+    if data is None and not applyZeroDefault:
+        return None
+
     from ufl import MixedElement
     if isinstance(element, MixedElement):
         # data is None -> use 0 default
diff --git a/python/dune/perftool/pdelab/driver/instationary.py b/python/dune/perftool/pdelab/driver/instationary.py
index fe2cbc5a..5c9bf3f6 100644
--- a/python/dune/perftool/pdelab/driver/instationary.py
+++ b/python/dune/perftool/pdelab/driver/instationary.py
@@ -67,7 +67,7 @@ def time_loop():
         osm = name_explicitonestepmethod()
         apply_call = "{}.apply(time, dt, {}, {}new);".format(osm, vector, vector)
     else:
-        dirichlet = preprocess_leaf_data(element, "dirichlet_expression")
+        dirichlet = preprocess_leaf_data(element, "interpolate_expression")
         boundary = name_boundary_function(element, dirichlet)
         osm = name_onestepmethod()
         apply_call = "{}.apply(time, dt, {}, {}, {}new);".format(osm, vector, boundary, vector)
diff --git a/python/dune/perftool/pdelab/driver/interpolate.py b/python/dune/perftool/pdelab/driver/interpolate.py
index c3c5911e..c2a7571e 100644
--- a/python/dune/perftool/pdelab/driver/interpolate.py
+++ b/python/dune/perftool/pdelab/driver/interpolate.py
@@ -18,20 +18,13 @@ from dune.perftool.pdelab.driver.gridoperator import (name_parameters,)
 from ufl import FiniteElement, MixedElement, TensorElement, VectorElement, TensorProductElement
 
 
-def _do_interpolate(dirichlet):
-    if isinstance(dirichlet, (list, tuple)):
-        return any(bool(d) for d in dirichlet)
-    else:
-        return bool(dirichlet)
-
 
 def interpolate_dirichlet_data(name):
     element = get_trial_element()
-    is_dirichlet = preprocess_leaf_data(element, "is_dirichlet")
-    if _do_interpolate(is_dirichlet) or not is_stationary():
+    func = preprocess_leaf_data(element, "interpolate_expression", applyZeroDefault=False)
+    if func is not None:
+        bf = name_boundary_function(element, func)
         gfs = name_trial_gfs()
-        dirichlet = preprocess_leaf_data(element, "dirichlet_expression")
-        bf = name_boundary_function(element, dirichlet)
         interpolate_vector(bf, gfs, name)
 
 
diff --git a/test/blockstructured/nonlinear/nonlinear.ufl b/test/blockstructured/nonlinear/nonlinear.ufl
index 6187bbeb..7932d0a1 100644
--- a/test/blockstructured/nonlinear/nonlinear.ufl
+++ b/test/blockstructured/nonlinear/nonlinear.ufl
@@ -10,6 +10,6 @@ u = TrialFunction(V)
 v = TestFunction(V)
 
 forms = [(inner(grad(u), grad(v)) + u*u*v - f*v)*dx]
-dirichlet_expression = g
+interpolate_expression = g
 exact_solution = g
 is_dirichlet = 1
diff --git a/test/blockstructured/poisson/3d/poisson.ufl b/test/blockstructured/poisson/3d/poisson.ufl
index 56260682..d45a6074 100644
--- a/test/blockstructured/poisson/3d/poisson.ufl
+++ b/test/blockstructured/poisson/3d/poisson.ufl
@@ -11,6 +11,6 @@ v = TestFunction(V)
 
 
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
-dirichlet_expression = g
+interpolate_expression = g
 exact_solution = g
 is_dirichlet = 1
diff --git a/test/blockstructured/poisson/poisson.ufl b/test/blockstructured/poisson/poisson.ufl
index d8a7ef0c..aa44e75a 100644
--- a/test/blockstructured/poisson/poisson.ufl
+++ b/test/blockstructured/poisson/poisson.ufl
@@ -10,6 +10,6 @@ u = TrialFunction(V)
 v = TestFunction(V)
 
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
-dirichlet_expression = g
+interpolate_expression = g
 exact_solution = g
 is_dirichlet = 1
diff --git a/test/blockstructured/poisson/poisson_neumann.ufl b/test/blockstructured/poisson/poisson_neumann.ufl
index 867403d8..c766be2f 100644
--- a/test/blockstructured/poisson/poisson_neumann.ufl
+++ b/test/blockstructured/poisson/poisson_neumann.ufl
@@ -17,6 +17,6 @@ v = TestFunction(V)
 ds = ds(subdomain_data=bctype)
 
 forms = [(inner(grad(u), grad(v)) - f*v)*dx - j*v*ds(0)]
-dirichlet_expression = g
+interpolate_expression = g
 exact_solution = g
 is_dirichlet = bctype
diff --git a/test/blockstructured/poisson/poisson_tensor.ufl b/test/blockstructured/poisson/poisson_tensor.ufl
index df8bcbab..5d345c75 100644
--- a/test/blockstructured/poisson/poisson_tensor.ufl
+++ b/test/blockstructured/poisson/poisson_tensor.ufl
@@ -13,6 +13,6 @@ u = TrialFunction(V)
 v = TestFunction(V)
 
 forms = [(inner(A*grad(u), grad(v)) + c*u*v -f*v)*dx]
-dirichlet_expression = g
+interpolate_expression = g
 exact_solution = g
 is_dirichlet = 1
diff --git a/test/blockstructured/stokes/stokes.ufl b/test/blockstructured/stokes/stokes.ufl
index c8f630b8..4fa3f5de 100644
--- a/test/blockstructured/stokes/stokes.ufl
+++ b/test/blockstructured/stokes/stokes.ufl
@@ -15,5 +15,5 @@ r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
 exact_solution = g_v, 8.*(1.-x[0])
diff --git a/test/heatequation/heatequation.ufl b/test/heatequation/heatequation.ufl
index 9fe2e20b..726b84a3 100644
--- a/test/heatequation/heatequation.ufl
+++ b/test/heatequation/heatequation.ufl
@@ -14,6 +14,6 @@ mass = (u*v)*dx
 poisson = (inner(grad(u), grad(v)) - f*v)*dx
 
 forms = [mass, poisson]
-dirichlet_expression = g
+interpolate_expression = g
 is_dirichlet = 1
 exact_solution = g
\ No newline at end of file
diff --git a/test/heatequation/heatequation_dg.ufl b/test/heatequation/heatequation_dg.ufl
index 8dfd7430..288d1e67 100644
--- a/test/heatequation/heatequation_dg.ufl
+++ b/test/heatequation/heatequation_dg.ufl
@@ -33,6 +33,6 @@ poisson = inner(grad(u), grad(v))*dx \
 mass = (u*v)*dx
 
 forms = [mass, poisson]
-dirichlet_expression = g
+interpolate_expression = g
 is_dirichlet = 1
 exact_solution = g
\ No newline at end of file
diff --git a/test/heatequation/heatequation_time_dependent_bc.ufl b/test/heatequation/heatequation_time_dependent_bc.ufl
index ac007925..8bf2a2d8 100644
--- a/test/heatequation/heatequation_time_dependent_bc.ufl
+++ b/test/heatequation/heatequation_time_dependent_bc.ufl
@@ -17,6 +17,6 @@ mass = (u*v)*dx
 poisson = (inner(grad(u), grad(v)) - f*v)*dx
 
 forms = [mass, poisson]
-dirichlet_expression = g
+interpolate_expression = g
 is_dirichlet = 1
 exact_solution = g
diff --git a/test/hyperbolic/linearacoustics.ufl b/test/hyperbolic/linearacoustics.ufl
index 8b9d48c4..d72476cc 100644
--- a/test/hyperbolic/linearacoustics.ufl
+++ b/test/hyperbolic/linearacoustics.ufl
@@ -29,4 +29,4 @@ r = -1. * inner(flux, grad(v))*dx \
   + inner(u, v)*ds
 
 forms = [mass, r]
-dirichlet_expression = f, 0.0, 0.0
+interpolate_expression = f, 0.0, 0.0
diff --git a/test/hyperbolic/lineartransport.ufl b/test/hyperbolic/lineartransport.ufl
index 858a18bd..20ad8bf5 100644
--- a/test/hyperbolic/lineartransport.ufl
+++ b/test/hyperbolic/lineartransport.ufl
@@ -27,5 +27,5 @@ r = -1.*u*inner(beta, grad(v))*dx \
 
 forms = [mass, r]
 is_dirichlet = dirichlet
-dirichlet_expression = initial
+interpolate_expression = initial
 exact_solution = 0
\ No newline at end of file
diff --git a/test/hyperbolic/shallowwater.ufl b/test/hyperbolic/shallowwater.ufl
index 8737b285..eee5ea80 100644
--- a/test/hyperbolic/shallowwater.ufl
+++ b/test/hyperbolic/shallowwater.ufl
@@ -33,4 +33,4 @@ r = -1. * inner(flux, grad(v))*dx \
   + inner(boundary_flux, v)*ds
 
 forms = [mass, r]
-dirichlet_expression = f, 0.0
+interpolate_expression = f, 0.0
diff --git a/test/nonlinear/diffusivewave.ufl b/test/nonlinear/diffusivewave.ufl
index 66b25243..fc92f13d 100644
--- a/test/nonlinear/diffusivewave.ufl
+++ b/test/nonlinear/diffusivewave.ufl
@@ -32,4 +32,4 @@ poisson = inner(K*grad(u), grad(v))*dx \
 mass = (u*v)*dx
 
 forms = [mass, poisson]
-dirichlet_expression = sin(pi*x[0])
+interpolate_expression = sin(pi*x[0])
diff --git a/test/nonlinear/nonlinear.ufl b/test/nonlinear/nonlinear.ufl
index f81b287e..b22d7437 100644
--- a/test/nonlinear/nonlinear.ufl
+++ b/test/nonlinear/nonlinear.ufl
@@ -12,5 +12,5 @@ r = (inner(grad(u), grad(v)) + u*u*v - f*v)*dx
 
 forms = [r]
 exact_solution = g
-dirichlet_expression = g
+interpolate_expression = g
 is_dirichlet = 1
\ No newline at end of file
diff --git a/test/poisson/dimension-grid-variations/poisson_1d_cg_interval.ufl b/test/poisson/dimension-grid-variations/poisson_1d_cg_interval.ufl
index 5eefb2d7..4125994a 100644
--- a/test/poisson/dimension-grid-variations/poisson_1d_cg_interval.ufl
+++ b/test/poisson/dimension-grid-variations/poisson_1d_cg_interval.ufl
@@ -12,4 +12,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/poisson/dimension-grid-variations/poisson_2d_cg_quadrilateral.ufl b/test/poisson/dimension-grid-variations/poisson_2d_cg_quadrilateral.ufl
index d3771aac..5b870f08 100644
--- a/test/poisson/dimension-grid-variations/poisson_2d_cg_quadrilateral.ufl
+++ b/test/poisson/dimension-grid-variations/poisson_2d_cg_quadrilateral.ufl
@@ -12,4 +12,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/poisson/dimension-grid-variations/poisson_2d_cg_triangle.ufl b/test/poisson/dimension-grid-variations/poisson_2d_cg_triangle.ufl
index e95064df..c07533d5 100644
--- a/test/poisson/dimension-grid-variations/poisson_2d_cg_triangle.ufl
+++ b/test/poisson/dimension-grid-variations/poisson_2d_cg_triangle.ufl
@@ -11,4 +11,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/poisson/dimension-grid-variations/poisson_3d_cg_hexahedron.ufl b/test/poisson/dimension-grid-variations/poisson_3d_cg_hexahedron.ufl
index 93e880da..7bfd7370 100644
--- a/test/poisson/dimension-grid-variations/poisson_3d_cg_hexahedron.ufl
+++ b/test/poisson/dimension-grid-variations/poisson_3d_cg_hexahedron.ufl
@@ -11,4 +11,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/poisson/dimension-grid-variations/poisson_3d_cg_tetrahedron.ufl b/test/poisson/dimension-grid-variations/poisson_3d_cg_tetrahedron.ufl
index 61ebabe8..b6e70a98 100644
--- a/test/poisson/dimension-grid-variations/poisson_3d_cg_tetrahedron.ufl
+++ b/test/poisson/dimension-grid-variations/poisson_3d_cg_tetrahedron.ufl
@@ -11,4 +11,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/poisson/poisson.ufl b/test/poisson/poisson.ufl
index 2bfe3313..025f1e8c 100644
--- a/test/poisson/poisson.ufl
+++ b/test/poisson/poisson.ufl
@@ -13,5 +13,5 @@ v = TestFunction(V)
 
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
-dirichlet_expression = g
+interpolate_expression = g
 is_dirichlet = 1
\ No newline at end of file
diff --git a/test/poisson/poisson_neumann.ufl b/test/poisson/poisson_neumann.ufl
index d9518421..aa69d6fe 100644
--- a/test/poisson/poisson_neumann.ufl
+++ b/test/poisson/poisson_neumann.ufl
@@ -19,4 +19,4 @@ ds = ds(subdomain_data=bctype)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx - j*v*ds(0)]
 exact_solution = g
 is_dirichlet = bctype
-dirichlet_expression = g
\ No newline at end of file
+interpolate_expression = g
\ No newline at end of file
diff --git a/test/poisson/poisson_tensor.ufl b/test/poisson/poisson_tensor.ufl
index 7208c1e0..08898c93 100644
--- a/test/poisson/poisson_tensor.ufl
+++ b/test/poisson/poisson_tensor.ufl
@@ -15,4 +15,4 @@ v = TestFunction(V)
 forms = [(inner(A*grad(u), grad(v)) + c*u*v -f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
\ No newline at end of file
+interpolate_expression = g
\ No newline at end of file
diff --git a/test/stokes/stokes.ufl b/test/stokes/stokes.ufl
index 4307fbee..6debda65 100644
--- a/test/stokes/stokes.ufl
+++ b/test/stokes/stokes.ufl
@@ -15,5 +15,5 @@ r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
 exact_solution = g_v, 8.*(1.-x[0])
\ No newline at end of file
diff --git a/test/stokes/stokes_3d_quadrilateral.ufl b/test/stokes/stokes_3d_quadrilateral.ufl
index 08882988..24d799a8 100644
--- a/test/stokes/stokes_3d_quadrilateral.ufl
+++ b/test/stokes/stokes_3d_quadrilateral.ufl
@@ -16,4 +16,4 @@ r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
 forms = [r]
 exact_solution = g_v, 8.*(1.-x[0])
 is_dirichlet = v_bctype, v_bctype, v_bctype, 0
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
diff --git a/test/stokes/stokes_quadrilateral.ufl b/test/stokes/stokes_quadrilateral.ufl
index c8f630b8..4fa3f5de 100644
--- a/test/stokes/stokes_quadrilateral.ufl
+++ b/test/stokes/stokes_quadrilateral.ufl
@@ -15,5 +15,5 @@ r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
 exact_solution = g_v, 8.*(1.-x[0])
diff --git a/test/stokes/stokes_stress.ufl b/test/stokes/stokes_stress.ufl
index a25a73ad..8e8aaf14 100644
--- a/test/stokes/stokes_stress.ufl
+++ b/test/stokes/stokes_stress.ufl
@@ -16,5 +16,5 @@ r = (inner(grad(v), S) + inner(grad(u) - S, T) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0, 0, 0, 0, 0
-dirichlet_expression = 4*x[1]*(1.-x[1]), 0.0, None, None, None, None, None
+interpolate_expression = 4*x[1]*(1.-x[1]), 0.0, None, None, None, None, None
 exact_solution = 4*x[1]*(1.-x[1]), 0.0, 8*(1.-x[0]), 0.0, 0.0, -1.*8*x[1] + 4., 0.0
\ No newline at end of file
diff --git a/test/stokes/stokes_stress_sym.ufl b/test/stokes/stokes_stress_sym.ufl
index f5dc520c..012f70db 100644
--- a/test/stokes/stokes_stress_sym.ufl
+++ b/test/stokes/stokes_stress_sym.ufl
@@ -22,5 +22,5 @@ r = (inner(grad(v), S) + inner(2*sym(grad(u)) - S, T) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0, 0, 0, 0
-dirichlet_expression = 4*x[1]*(1.-x[1]), 0.0, None, None, None, None
+interpolate_expression = 4*x[1]*(1.-x[1]), 0.0, None, None, None, None
 exact_solution = 4*x[1]*(1.-x[1]), 0.0, 8*(1.-x[0]), 0.0, 0.0, -1.*8*x[1] + 4.
\ No newline at end of file
diff --git a/test/stokes/stokes_sym.ufl b/test/stokes/stokes_sym.ufl
index 1ae13db6..554101ab 100644
--- a/test/stokes/stokes_sym.ufl
+++ b/test/stokes/stokes_sym.ufl
@@ -18,5 +18,5 @@ r = (inner(2*sym(grad(u)), grad(v)) - div(v)*p - q*div(u))*dx - inner(grad(u).T*
 
 forms = [r]
 is_dirichlet = v_bctype, v_bctype, 0
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
 exact_solution = g_v, 8.*(1.-x[0])
\ No newline at end of file
diff --git a/test/sumfact/hyperbolic/linearacoustics.ufl b/test/sumfact/hyperbolic/linearacoustics.ufl
index 8b9d48c4..d72476cc 100644
--- a/test/sumfact/hyperbolic/linearacoustics.ufl
+++ b/test/sumfact/hyperbolic/linearacoustics.ufl
@@ -29,4 +29,4 @@ r = -1. * inner(flux, grad(v))*dx \
   + inner(u, v)*ds
 
 forms = [mass, r]
-dirichlet_expression = f, 0.0, 0.0
+interpolate_expression = f, 0.0, 0.0
diff --git a/test/sumfact/hyperbolic/lineartransport.ufl b/test/sumfact/hyperbolic/lineartransport.ufl
index 8fa698d9..d1f41250 100644
--- a/test/sumfact/hyperbolic/lineartransport.ufl
+++ b/test/sumfact/hyperbolic/lineartransport.ufl
@@ -28,4 +28,4 @@ r = -1.*u*inner(beta, grad(v))*dx \
 forms = [mass, r]
 exact_solution = 0.0
 is_dirichlet = dirichlet
-dirichlet_expression = initial
\ No newline at end of file
+interpolate_expression = initial
\ No newline at end of file
diff --git a/test/sumfact/hyperbolic/shallowwater.ufl b/test/sumfact/hyperbolic/shallowwater.ufl
index 9fca496e..0db71cf1 100644
--- a/test/sumfact/hyperbolic/shallowwater.ufl
+++ b/test/sumfact/hyperbolic/shallowwater.ufl
@@ -36,4 +36,4 @@ r = -1. * inner(flux, grad(v))*dx \
   + inner(boundary_flux, v)*ds
 
 forms = [mass, r]
-dirichlet_expression = f, 0.0, 0.0
+interpolate_expression = f, 0.0, 0.0
diff --git a/test/sumfact/poisson/poisson_2d.ufl b/test/sumfact/poisson/poisson_2d.ufl
index d2c78a8d..97cc99c4 100644
--- a/test/sumfact/poisson/poisson_2d.ufl
+++ b/test/sumfact/poisson/poisson_2d.ufl
@@ -15,4 +15,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/sumfact/poisson/poisson_3d.ufl b/test/sumfact/poisson/poisson_3d.ufl
index 529db2a0..75f0331a 100644
--- a/test/sumfact/poisson/poisson_3d.ufl
+++ b/test/sumfact/poisson/poisson_3d.ufl
@@ -12,4 +12,4 @@ v = TestFunction(V)
 forms = [(inner(grad(u), grad(v)) - f*v)*dx]
 exact_solution = g
 is_dirichlet = 1
-dirichlet_expression = g
+interpolate_expression = g
diff --git a/test/sumfact/stokes/stokes.ufl b/test/sumfact/stokes/stokes.ufl
index fafe0714..1286a48d 100644
--- a/test/sumfact/stokes/stokes.ufl
+++ b/test/sumfact/stokes/stokes.ufl
@@ -16,5 +16,5 @@ r = (inner(grad(v), grad(u)) - div(v)*p - q*div(u))*dx
 
 forms = [r]
 exact_solution = g_v, 8.*(1.-x[0])
-dirichlet_expression = g_v, None
+interpolate_expression = g_v, None
 is_dirichlet = v_bctype, v_bctype, None
\ No newline at end of file
-- 
GitLab