From 855045f0d09327d6e39b0bc7091bd6c51f844f85 Mon Sep 17 00:00:00 2001
From: Manuel Weberndorfer <manuel.weberndorfer@id.ethz.ch>
Date: Thu, 28 Oct 2021 08:17:30 +0000
Subject: [PATCH] disable LeastSquaresSolver for complex scalar type

---
 cpppetsc/test/LeastSquaresSolver_Test.cc           | 4 ++++
 solve/src/include/ae108/solve/LeastSquaresSolver.h | 4 ++++
 solve/test/LeastSquaresSolver_Test.cc              | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/cpppetsc/test/LeastSquaresSolver_Test.cc b/cpppetsc/test/LeastSquaresSolver_Test.cc
index a5a7d4e1..62a50bda 100644
--- a/cpppetsc/test/LeastSquaresSolver_Test.cc
+++ b/cpppetsc/test/LeastSquaresSolver_Test.cc
@@ -13,6 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#ifndef AE108_PETSC_COMPLEX
+
 #include "ae108/cpppetsc/LeastSquaresSolver.h"
 #include "ae108/cpppetsc/ParallelComputePolicy.h"
 #include "ae108/cpppetsc/SequentialComputePolicy.h"
@@ -86,3 +88,5 @@ TYPED_TEST(LeastSquaresSolver_Test,
 } // namespace
 } // namespace cpppetsc
 } // namespace ae108
+
+#endif
\ No newline at end of file
diff --git a/solve/src/include/ae108/solve/LeastSquaresSolver.h b/solve/src/include/ae108/solve/LeastSquaresSolver.h
index a3614db8..f344fea7 100644
--- a/solve/src/include/ae108/solve/LeastSquaresSolver.h
+++ b/solve/src/include/ae108/solve/LeastSquaresSolver.h
@@ -15,6 +15,8 @@
 
 #pragma once
 
+#ifndef AE108_PETSC_COMPLEX
+
 #include "ae108/assembly/AssemblerTypeTraits.h"
 #include "ae108/cpppetsc/LeastSquaresSolver.h"
 #include "ae108/cpppetsc/MeshBoundaryCondition.h"
@@ -260,3 +262,5 @@ LeastSquaresSolver<Assembler>::computeSolution(
 
 } // namespace solve
 } // namespace ae108
+
+#endif
\ No newline at end of file
diff --git a/solve/test/LeastSquaresSolver_Test.cc b/solve/test/LeastSquaresSolver_Test.cc
index b2a7058d..cdd2b764 100644
--- a/solve/test/LeastSquaresSolver_Test.cc
+++ b/solve/test/LeastSquaresSolver_Test.cc
@@ -13,6 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#ifndef AE108_PETSC_COMPLEX
+
 #include "ae108/cpppetsc/ParallelComputePolicy.h"
 #include "ae108/cpppetsc/SequentialComputePolicy.h"
 #include "ae108/cpppetsc/Vector.h"
@@ -95,3 +97,5 @@ TYPED_TEST(LeastSquaresSolver_Test, bc_solve_works) {
 } // namespace
 } // namespace solve
 } // namespace ae108
+
+#endif
\ No newline at end of file
-- 
GitLab