From 993fe07b8441398e4c5ee9be0c1abd86df3d292f Mon Sep 17 00:00:00 2001
From: Laura Pfeiffer <laura.pfeiffer@kit.edu>
Date: Thu, 28 Jul 2022 10:27:56 +0200
Subject: [PATCH] fixed Monodomain tests

---
 cardmech/src/electrophysiology/MainMonodomain.cpp          | 7 ++++++-
 .../electrophysiology/problem/ElphyHexaCube2dProblem.cpp   | 3 +--
 .../electrophysiology/problem/ElphyTetraCubeProblem.cpp    | 3 +--
 cardmech/test/electrophysiology/TestMonodomain.cpp         | 1 -
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cardmech/src/electrophysiology/MainMonodomain.cpp b/cardmech/src/electrophysiology/MainMonodomain.cpp
index 82d50ac4c..863528ed4 100644
--- a/cardmech/src/electrophysiology/MainMonodomain.cpp
+++ b/cardmech/src/electrophysiology/MainMonodomain.cpp
@@ -165,7 +165,12 @@ std::vector<double> MainMonodomain::Evaluate(const Vector &solution) {
   std::string elphyModelClass = "IBTElphyModel";
   config.get("ElphyModelClass", elphyModelClass);
   string cmName = "FitzHughNagumo";
-  config.get("ElphyModelName", cmName);
+  if (elphyModelClass== "IBTElphyModel"){
+    config.get("IBTVentricleModel", cmName);
+  }else{
+    config.get("ElphyModelName", cmName);
+  }
+
   std::string IextSmooth;
   config.get("ExternalCurrentSmoothingInTime", IextSmooth);
   std::string  IextSpaceSmoothing;
diff --git a/cardmech/src/electrophysiology/problem/ElphyHexaCube2dProblem.cpp b/cardmech/src/electrophysiology/problem/ElphyHexaCube2dProblem.cpp
index 8785cd6c5..42ed78d1c 100644
--- a/cardmech/src/electrophysiology/problem/ElphyHexaCube2dProblem.cpp
+++ b/cardmech/src/electrophysiology/problem/ElphyHexaCube2dProblem.cpp
@@ -1,12 +1,11 @@
 #include "ElphyHexaCube2dProblem.hpp"
 
-constexpr std::array<double, 2> potentialValues{12.52738402, -84.57368826};
+constexpr std::array<double, 2> potentialValues{12.5392709, -84.57368804};
 
 std::string ElphyHexaCube2dProblem::Evaluate(const Vector &solution) const {
   std::string evaluation{};
 
   auto values = getEvaluationAt(solution, {Point(0.0, 0.0), Point(5.0, 3.0)});
-
   evaluation += "V(0.0,0.0) = " + std::to_string(values[0]) + "\n";
   evaluation += "V(5.0,3.0) = " + std::to_string(values[1]) + "\n";
 
diff --git a/cardmech/src/electrophysiology/problem/ElphyTetraCubeProblem.cpp b/cardmech/src/electrophysiology/problem/ElphyTetraCubeProblem.cpp
index cac529c1c..4fa57e18e 100644
--- a/cardmech/src/electrophysiology/problem/ElphyTetraCubeProblem.cpp
+++ b/cardmech/src/electrophysiology/problem/ElphyTetraCubeProblem.cpp
@@ -1,14 +1,13 @@
 #include "ElphyTetraCubeProblem.hpp"
 
 
-constexpr std::array<double, 2> potentialValues{22.69191409, -84.57239522};
+constexpr std::array<double, 2> potentialValues{22.29586486, -84.57236069};
 
 
 std::string ElphyTetraCubeProblem::Evaluate(const Vector &solution) const {
   std::string evaluation{};
 
   auto values = getEvaluationAt(solution, {Point(0.0, 0.0, 0.0), Point(5.0, 3.0, 3.0)});
-
   evaluation += "V(0.0,0.0,0.0) = " + std::to_string(values[0]) + "\n";
   evaluation += "V(5.0,3.0,3.0) = " + std::to_string(values[1]) + "\n";
 
diff --git a/cardmech/test/electrophysiology/TestMonodomain.cpp b/cardmech/test/electrophysiology/TestMonodomain.cpp
index 2ea2aeb33..d46d9c2a7 100644
--- a/cardmech/test/electrophysiology/TestMonodomain.cpp
+++ b/cardmech/test/electrophysiology/TestMonodomain.cpp
@@ -77,7 +77,6 @@ protected:
 TEST_P(MonodomainTest, CheckValueWithoutDiffusion) {
   Vector &solution = cmMain->Run();
   auto evalResults = cmMain->Evaluate(solution);
-
   for (auto result: evalResults)
     ASSERT_NEAR(result, 0.0, TEST_TOLERANCE);
 }
-- 
GitLab