From 81bb30cf98ff3921d1dfa4db6ba6551d26a99ded Mon Sep 17 00:00:00 2001
From: Johannes Boog <johannesboog@yahoo.de>
Date: Tue, 7 Sep 2021 12:21:39 +0200
Subject: [PATCH] [bugfix] set gml flag when running benchmarks

---
 R/sim_utils.R | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/R/sim_utils.R b/R/sim_utils.R
index a1b06f8..89fba87 100644
--- a/R/sim_utils.R
+++ b/R/sim_utils.R
@@ -285,8 +285,14 @@ run_benchmark <- function(prj_path,
     ogs6_obj <- OGS6$new(sim_name = sim_name,
                          sim_path = sim_path)
 
+    # check if *.gml file is present
+    read_gml <-  ifelse(
+                    any(sapply(list.files(), function(x) grepl(".gml", x))),
+                    T, F)
+
     read_in_prj(ogs6_obj = ogs6_obj,
-                prj_path = prj_path)
+                prj_path = prj_path,
+                read_in_gml = read_gml)
 
     return(invisible(ogs6_run_simulation(ogs6_obj,
                                     ogs6_bin_path = ogs6_bin_path)))
-- 
GitLab