From ff40bed1178c2f4708b2ba8e0d9d4d34c2983a6e Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Tue, 25 Oct 2016 17:41:42 +0200
Subject: [PATCH] Introduce a sumfactorization mass matrix test

and use it as the only sumfact test until it works.
---
 test/sumfact/CMakeLists.txt         |  1 +
 test/sumfact/mass/CMakeLists.txt    |  5 +++++
 test/sumfact/mass/mass.mini         | 13 +++++++++++++
 test/sumfact/mass/mass.ufl          | 10 ++++++++++
 test/sumfact/poisson/CMakeLists.txt | 12 ++++++------
 5 files changed, 35 insertions(+), 6 deletions(-)
 create mode 100644 test/sumfact/mass/CMakeLists.txt
 create mode 100644 test/sumfact/mass/mass.mini
 create mode 100644 test/sumfact/mass/mass.ufl

diff --git a/test/sumfact/CMakeLists.txt b/test/sumfact/CMakeLists.txt
index 6ef2765c..c3435819 100644
--- a/test/sumfact/CMakeLists.txt
+++ b/test/sumfact/CMakeLists.txt
@@ -1 +1,2 @@
+add_subdirectory(mass)
 add_subdirectory(poisson)
diff --git a/test/sumfact/mass/CMakeLists.txt b/test/sumfact/mass/CMakeLists.txt
new file mode 100644
index 00000000..a3357bef
--- /dev/null
+++ b/test/sumfact/mass/CMakeLists.txt
@@ -0,0 +1,5 @@
+# A mass matrix test: Simplest possible example
+dune_add_formcompiler_system_test(UFLFILE mass.ufl
+                                  BASENAME sumfact_mass
+                                  INIFILE mass.mini
+                                  )
diff --git a/test/sumfact/mass/mass.mini b/test/sumfact/mass/mass.mini
new file mode 100644
index 00000000..acab6ddc
--- /dev/null
+++ b/test/sumfact/mass/mass.mini
@@ -0,0 +1,13 @@
+__name = sumfact_mass_{__exec_suffix}
+__exec_suffix = numdiff, symdiff | expand num
+
+cells = 1 1
+extension = 1. 1.
+
+[wrapper.vtkcompare]
+name = {__name}
+extension = vtu
+
+[formcompiler]
+numerical_jacobian = 1, 0 | expand num
+sumfact = 1
diff --git a/test/sumfact/mass/mass.ufl b/test/sumfact/mass/mass.ufl
new file mode 100644
index 00000000..6434e09f
--- /dev/null
+++ b/test/sumfact/mass/mass.ufl
@@ -0,0 +1,10 @@
+cell = "quadrilateral"
+
+V = FiniteElement("DG", cell, 1)
+
+u = TrialFunction(V)
+v = TestFunction(V)
+
+r = u * v * dx
+
+forms = [r]
diff --git a/test/sumfact/poisson/CMakeLists.txt b/test/sumfact/poisson/CMakeLists.txt
index 6a7006ce..07d4ab70 100644
--- a/test/sumfact/poisson/CMakeLists.txt
+++ b/test/sumfact/poisson/CMakeLists.txt
@@ -3,9 +3,9 @@
 #                                   BASENAME sumfact_poisson
 #                                   INIFILE poisson.mini
 #                                   )
-
-# 2. Poisson Test Case: DG, f + pure dirichlet
-dune_add_formcompiler_system_test(UFLFILE poisson_dg.ufl
-                                  BASENAME sumfact_poisson_dg
-                                  INIFILE poisson_dg.mini
-                                  )
+#
+# # 2. Poisson Test Case: DG, f + pure dirichlet
+#dune_add_formcompiler_system_test(UFLFILE poisson_dg.ufl
+#                                  BASENAME sumfact_poisson_dg
+#                                  INIFILE poisson_dg.mini
+#                                  )
-- 
GitLab