From cb8a38a44fd2efdf981e380e57731c5b19a3def2 Mon Sep 17 00:00:00 2001
From: aheinri5 <Anna@netzkritzler.de>
Date: Fri, 18 Dec 2020 10:02:38 +0100
Subject: [PATCH] [base] Cleanup NAMESPACE, deleted unused files

---
 NAMESPACE                                   |  1 +
 R/cluster_config.R                          | 36 ---------------------
 inst/examples/read_from_benchmark_example.R | 18 +++++------
 man/setup_logging.Rd                        | 18 -----------
 man/validate_ensemble_parameters.Rd         | 17 ----------
 5 files changed, 10 insertions(+), 80 deletions(-)
 delete mode 100644 R/cluster_config.R
 delete mode 100644 man/setup_logging.Rd
 delete mode 100644 man/validate_ensemble_parameters.Rd

diff --git a/NAMESPACE b/NAMESPACE
index 6164882..75c8583 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,6 +1,7 @@
 # Generated by roxygen2: do not edit by hand
 
 export(OGS6)
+export(OGS6_Chain)
 export(OGS6_Ensemble)
 export(generate_benchmark_script)
 export(generate_structured_mesh)
diff --git a/R/cluster_config.R b/R/cluster_config.R
deleted file mode 100644
index e0be840..0000000
--- a/R/cluster_config.R
+++ /dev/null
@@ -1,36 +0,0 @@
-#This script only contains some tests for parallel computing so far
-
-#System vars
-
-#Check for number of available cores / logical cores (not always reliable on Unix-like systems)
-parallel::detectCores()
-parallel::detectCores(logical = FALSE)
-
-# output_file_name <- "output.txt"
-#
-# socket_cluster <- parallel::makeCluster(4, outfile = output_file_name)
-#
-# parallel::clusterExport(socket_cluster, list("print_pid"))
-#
-# #parallel::clusterCall(socket_cluster, "Sys.getpid")
-#
-# parallel::clusterCall(socket_cluster, "print_pid")
-#
-# parallel::stopCluster(socket_cluster)
-#
-# read_output(output_file_name, TRUE)
-
-# print_pid <- function(...) {
-#   #Don't move s construction in cat(), else the file will get all mingled up!
-#   s <- paste("My process ID is ", Sys.getpid(), "\n")
-#   cat(s)
-# }
-#
-# read_output <- function(file_name, delete_after_read = FALSE) {
-#   cat(paste0(readLines(file_name), collapse="\n"))
-#   if(delete_after_read) {
-#     if (file.exists(file_name))
-#       file.remove(file_name)
-#   }
-# }
-
diff --git a/inst/examples/read_from_benchmark_example.R b/inst/examples/read_from_benchmark_example.R
index 8ad480b..dcaa37f 100644
--- a/inst/examples/read_from_benchmark_example.R
+++ b/inst/examples/read_from_benchmark_example.R
@@ -10,15 +10,15 @@ library(r2ogs6)
 
 # If you run this, alter ogs_bin_path below to fit your installation location!
 
-ogs_bin_path <- paste0("D:\\Programme\\OpenGeoSys\\",
+ogs_bin_path <- paste0("D:/Programme/OpenGeoSys/",
                        "ogs-6.3.2-Windows-10.0.14393-x64-python-3.7.2-de-utils",
-                       "\\bin\\")
+                       "/bin/")
 
 #First, we need to create a simulation object.
 
 ogs6_obj <- OGS6$new(sim_name = "my_sim",
                      sim_id = 1,
-                     sim_path = "D:\\OGS_Sim\\",
+                     sim_path = "D:/OGS_Sim/",
                      ogs_bin_path = ogs_bin_path)
 
 
@@ -29,11 +29,11 @@ ogs6_obj <- OGS6$new(sim_name = "my_sim",
 
 prj_path <- paste0("inst/extdata/flow_free_expansion/flow_free_expansion.prj")
 
-# Alternative path (also system dependent)
-alt_path = paste0("D:\\Programme\\OpenGeoSys\\",
-                  "ogs-master-Tests-Data-HydroMechanics\\",
-                  "Tests\\Data\\HydroMechanics\\IdealGas\\",
-                  "flow_no_strain\\flow_no_strain.prj")
+# # Alternative path (also system dependent)
+# alt_path = paste0("D:\\Programme\\OpenGeoSys\\",
+#                   "ogs-master-Tests-Data-HydroMechanics\\",
+#                   "Tests\\Data\\HydroMechanics\\IdealGas\\",
+#                   "flow_no_strain\\flow_no_strain.prj")
 
 read_in_prj(ogs6_obj, prj_path)
 
@@ -43,4 +43,4 @@ read_in_prj(ogs6_obj, prj_path)
 
 #Calls OGS6 validators, exports all necessary files and starts OpenGeoSys6
 
-run_simulation(ogs6_obj)
+e <- run_simulation(ogs6_obj)
diff --git a/man/setup_logging.Rd b/man/setup_logging.Rd
deleted file mode 100644
index 147425a..0000000
--- a/man/setup_logging.Rd
+++ /dev/null
@@ -1,18 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/sim_utils.R
-\name{setup_logging}
-\alias{setup_logging}
-\title{setup_logging}
-\usage{
-setup_logging(sim_name, sim_path, ogs6_call)
-}
-\arguments{
-\item{sim_name}{string: Simulation name}
-
-\item{sim_path}{string: Simulation path}
-
-\item{ogs6_call}{string: Corresponding OGS6 call}
-}
-\description{
-Sets up logging.
-}
diff --git a/man/validate_ensemble_parameters.Rd b/man/validate_ensemble_parameters.Rd
deleted file mode 100644
index 3300c7b..0000000
--- a/man/validate_ensemble_parameters.Rd
+++ /dev/null
@@ -1,17 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/ogs6_ensemble.R
-\name{validate_ensemble_parameters}
-\alias{validate_ensemble_parameters}
-\title{validate_ensemble_parameters}
-\usage{
-validate_ensemble_parameters(parameters, ogs6_obj_ref)
-}
-\arguments{
-\item{parameters}{list: The specified parameters}
-
-\item{ogs6_obj_ref}{string: Deparsed argument, for checking if the parameters
-came from the same OGS6 object that the OGS6_Ensemble is based on}
-}
-\description{
-Validates the parameters given to an OGS6_Ensemble object
-}
-- 
GitLab