From 03e70298f92110ae4d979d0a80261d28b501d9ab Mon Sep 17 00:00:00 2001
From: aheinri5 <Anna@netzkritzler.de>
Date: Fri, 18 Dec 2020 22:46:27 +0100
Subject: [PATCH] [base] Took out exit code cat

---
 R/sim_utils.R | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/R/sim_utils.R b/R/sim_utils.R
index 3bf35e4..f55a2aa 100644
--- a/R/sim_utils.R
+++ b/R/sim_utils.R
@@ -36,6 +36,11 @@ run_simulation <- function(ogs6_obj, write_logfile = TRUE) {
     export_gml(ogs6_obj)
     export_prj(ogs6_obj)
 
+    # Copy all referenced .vtu files to ogs6_obj$sim_path
+    for(i in seq_len(length(ogs6_obj$meshes))){
+        file.copy(ogs6_obj$meshes[[i]]$mesh_path, ogs6_obj$sim_path)
+    }
+
     # Construct the call
     ogs6_command_str <- paste0(ogs6_obj$ogs_bin_path, "ogs.exe")
     sim_path_full <- paste0(ogs6_obj$sim_path,
@@ -71,8 +76,6 @@ run_simulation <- function(ogs6_obj, write_logfile = TRUE) {
 
     closeAllConnections()
 
-    cat("\nCaught exit code", exit_code, "\n")
-
     return(invisible(exit_code))
 }
 
-- 
GitLab