From 0710563c9e61d114fea28afc6e7ce8848df9828d Mon Sep 17 00:00:00 2001
From: Max Jaeschke <max.jaeschke@htwk-leipzig.de>
Date: Fri, 10 Jan 2025 23:05:23 +0100
Subject: [PATCH] Add OGS-Fatal for domain deactivation

Remove this
---
 ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp
index ecb6a3cdc4a..576aad5db10 100644
--- a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp
+++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp
@@ -222,7 +222,14 @@ void HeatTransportBHEProcess::assembleConcreteProcess(
 
     if (_process_data._is_linear)
     {
-        auto const& spec = this->getMatrixSpecifications(process_id);
+        if (!getActiveElementIDs().empty())
+        {
+            OGS_FATAL(
+                "Domain Deactivation is currently not implemnted with "
+                "linear optimization.");
+        }
+
+        auto const& spec = getMatrixSpecifications(process_id);
 
         // use matrix cache for soil elements
         _asm_mat_cache.assemble(t, dt, x, x_prev, process_id, &M, &K, &b,
-- 
GitLab