From 490f427b8bec28f1e5dedec46c3c9dc82f78a314 Mon Sep 17 00:00:00 2001
From: aheinri5 <Anna@netzkritzler.de>
Date: Wed, 9 Dec 2020 15:11:42 +0100
Subject: [PATCH] [docs] Updated documentation

---
 man/OGS6.Rd                    | 190 ++++++++++++++++++++++++++++++++-
 man/construct_add_call.Rd      |  10 +-
 man/delete_nulls_from_str.Rd   |  16 +++
 man/generate_all_benchmarks.Rd |   7 +-
 man/r2ogs6_parameter.Rd        |  44 ++++++--
 man/to_node.Rd                 |  14 +--
 6 files changed, 257 insertions(+), 24 deletions(-)
 create mode 100644 man/delete_nulls_from_str.Rd

diff --git a/man/OGS6.Rd b/man/OGS6.Rd
index 7f57ee2..d3a9656 100644
--- a/man/OGS6.Rd
+++ b/man/OGS6.Rd
@@ -6,6 +6,51 @@
 \description{
 Constructor for the OGS6 base class
 }
+\section{Active bindings}{
+\if{html}{\out{<div class="r6-active-bindings">}}
+\describe{
+\item{\code{sim_output}}{Getter for OGS6 private parameter '.sim_output'}
+
+\item{\code{sim_name}}{Getter for OGS6 private parameter '.sim_name'}
+
+\item{\code{sim_id}}{Getter for OGS6 private parameter '.sim_id'}
+
+\item{\code{sim_path}}{Getter for OGS6 private parameter '.sim_path'}
+
+\item{\code{ogs_bin_path}}{Getter for OGS6 private parameter '.ogs_bin_path'}
+
+\item{\code{gml}}{Getter for OGS6 private parameter '.gml'}
+
+\item{\code{meshes}}{Getter for OGS6 private parameter '.meshes'}
+
+\item{\code{geometry}}{Getter for OGS6 private parameter '.geometry'}
+
+\item{\code{python_script}}{Getter for OGS6 private parameter '.python_script'}
+
+\item{\code{processes}}{Getter for OGS6 private parameter '.processes'}
+
+\item{\code{time_loop}}{Getter for OGS6 private parameter '.time_loop'}
+
+\item{\code{local_coordinate_system}}{Getter for OGS6 private parameter '.local_coordinate_system'}
+
+\item{\code{media}}{Getter for OGS6 private parameter '.media'}
+
+\item{\code{parameters}}{Getter for OGS6 private parameter '.parameters'}
+
+\item{\code{curves}}{Getter for OGS6 private parameter '.curves'}
+
+\item{\code{process_variables}}{Getter for OGS6 private parameter '.process_variables'}
+
+\item{\code{nonlinear_solvers}}{Getter for OGS6 private parameter '.nonlinear_solvers'}
+
+\item{\code{linear_solvers}}{Getter for OGS6 private parameter '.linear_solvers'}
+
+\item{\code{test_definition}}{Getter for OGS6 private parameter '.test_definition'}
+
+\item{\code{insitu}}{Getter for OGS6 private parameter '.insitu'}
+}
+\if{html}{\out{</div>}}
+}
 \section{Methods}{
 \subsection{Public methods}{
 \itemize{
@@ -34,6 +79,7 @@ Constructor for the OGS6 base class
 \if{html}{\out{<a id="method-new"></a>}}
 \if{latex}{\out{\hypertarget{method-new}{}}}
 \subsection{Method \code{new()}}{
+Creates new OGS6 object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$new(sim_name, sim_id, sim_path, ogs_bin_path, test_mode = FALSE)}\if{html}{\out{</div>}}
 }
@@ -41,17 +87,17 @@ Constructor for the OGS6 base class
 \subsection{Arguments}{
 \if{html}{\out{<div class="arguments">}}
 \describe{
-\item{\code{sim_name}}{The name of the simulation}
+\item{\code{sim_name}}{string: Simulation name}
 
-\item{\code{sim_id}}{The ID of the simulation}
+\item{\code{sim_id}}{double: Simulation ID}
 
-\item{\code{sim_path}}{The path where all relevant files for the simulation will be
+\item{\code{sim_path}}{string: Path where all files for the simulation will be
 saved}
 
-\item{\code{ogs_bin_path}}{Path to OpenGeoSys6 /bin directory}
+\item{\code{ogs_bin_path}}{string: Path to OpenGeoSys6 /bin directory}
 
 \item{\code{test_mode}}{In test mode, sim_path and ogs_bin_path will not be
-validated. If you're not a developer, please leave this variable as it is :)}
+validated. If you're not a developer, please leave this as it is :)}
 }
 \if{html}{\out{</div>}}
 }
@@ -60,141 +106,265 @@ validated. If you're not a developer, please leave this variable as it is :)}
 \if{html}{\out{<a id="method-add_sim_output"></a>}}
 \if{latex}{\out{\hypertarget{method-add_sim_output}{}}}
 \subsection{Method \code{add_sim_output()}}{
+... (WIP)
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_sim_output(name, value)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{name}}{...}
+
+\item{\code{value}}{...}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_mesh"></a>}}
 \if{latex}{\out{\hypertarget{method-add_mesh}{}}}
 \subsection{Method \code{add_mesh()}}{
+Adds a r2ogs6_mesh object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_mesh(mesh)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{mesh}}{r2ogs6_mesh}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_gml"></a>}}
 \if{latex}{\out{\hypertarget{method-add_gml}{}}}
 \subsection{Method \code{add_gml()}}{
+Adds a r2ogs6_gml object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_gml(gml)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{gml}}{r2ogs6_gml}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_python_script"></a>}}
 \if{latex}{\out{\hypertarget{method-add_python_script}{}}}
 \subsection{Method \code{add_python_script()}}{
+Adds a python script
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_python_script(python_script)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{python_script}}{string: File name of python script}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_process"></a>}}
 \if{latex}{\out{\hypertarget{method-add_process}{}}}
 \subsection{Method \code{add_process()}}{
+Adds a r2ogs6_process object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_process(process)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{process}}{r2ogs6_process}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_time_loop"></a>}}
 \if{latex}{\out{\hypertarget{method-add_time_loop}{}}}
 \subsection{Method \code{add_time_loop()}}{
+Adds a r2ogs6_time_loop object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_time_loop(time_loop)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{time_loop}}{r2ogs6_time_loop}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_local_coordinate_system"></a>}}
 \if{latex}{\out{\hypertarget{method-add_local_coordinate_system}{}}}
 \subsection{Method \code{add_local_coordinate_system()}}{
+Adds a r2ogs6_local_coordinate_system object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_local_coordinate_system(local_coordinate_system)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{local_coordinate_system}}{r2ogs6_local_coordinate_system}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_medium"></a>}}
 \if{latex}{\out{\hypertarget{method-add_medium}{}}}
 \subsection{Method \code{add_medium()}}{
+Adds a r2ogs6_medium object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_medium(medium)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{medium}}{r2ogs6_medium}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_parameter"></a>}}
 \if{latex}{\out{\hypertarget{method-add_parameter}{}}}
 \subsection{Method \code{add_parameter()}}{
+Adds a r2ogs6_parameter object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_parameter(parameter)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{parameter}}{r2ogs6_parameter}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_curve"></a>}}
 \if{latex}{\out{\hypertarget{method-add_curve}{}}}
 \subsection{Method \code{add_curve()}}{
+Adds a r2ogs6_curve object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_curve(curve)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{curve}}{r2ogs6_curve}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_process_variable"></a>}}
 \if{latex}{\out{\hypertarget{method-add_process_variable}{}}}
 \subsection{Method \code{add_process_variable()}}{
+Adds a r2ogs6_process_variable object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_process_variable(process_variable)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{process_variable}}{r2ogs6_process_variable}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_nonlinear_solver"></a>}}
 \if{latex}{\out{\hypertarget{method-add_nonlinear_solver}{}}}
 \subsection{Method \code{add_nonlinear_solver()}}{
+Adds a r2ogs6_nonlinear_solver object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_nonlinear_solver(nonlinear_solver)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{nonlinear_solver}}{r2ogs6_nonlinear_solver}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_linear_solver"></a>}}
 \if{latex}{\out{\hypertarget{method-add_linear_solver}{}}}
 \subsection{Method \code{add_linear_solver()}}{
+Adds a r2ogs6_linear_solver object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_linear_solver(linear_solver)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{linear_solver}}{r2ogs6_linear_solver}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_vtkdiff"></a>}}
 \if{latex}{\out{\hypertarget{method-add_vtkdiff}{}}}
 \subsection{Method \code{add_vtkdiff()}}{
+Adds a r2ogs6_vtkdiff object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_vtkdiff(vtkdiff)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{vtkdiff}}{r2ogs6_vtkdiff}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-add_insitu"></a>}}
 \if{latex}{\out{\hypertarget{method-add_insitu}{}}}
 \subsection{Method \code{add_insitu()}}{
+Adds a r2ogs6_insitu object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$add_insitu(insitu)}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{insitu}}{r2ogs6_insitu}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-get_status"></a>}}
 \if{latex}{\out{\hypertarget{method-get_status}{}}}
 \subsection{Method \code{get_status()}}{
+Checks if the OGS6 object has all necessary parameters for
+starting a simulation
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$get_status()}\if{html}{\out{</div>}}
 }
@@ -204,10 +374,20 @@ validated. If you're not a developer, please leave this variable as it is :)}
 \if{html}{\out{<a id="method-clear"></a>}}
 \if{latex}{\out{\hypertarget{method-clear}{}}}
 \subsection{Method \code{clear()}}{
+Clears components from the OGS6 object
 \subsection{Usage}{
 \if{html}{\out{<div class="r">}}\preformatted{OGS6$clear(which = names(get_implemented_classes()))}\if{html}{\out{</div>}}
 }
 
+\subsection{Arguments}{
+\if{html}{\out{<div class="arguments">}}
+\describe{
+\item{\code{which}}{character: The names of the components (all by default).
+If you want to delete only some components, run
+names(get_implemented_classes()) for the available options.}
+}
+\if{html}{\out{</div>}}
+}
 }
 \if{html}{\out{<hr>}}
 \if{html}{\out{<a id="method-clone"></a>}}
diff --git a/man/construct_add_call.Rd b/man/construct_add_call.Rd
index 76831c7..a9727df 100644
--- a/man/construct_add_call.Rd
+++ b/man/construct_add_call.Rd
@@ -7,15 +7,17 @@
 construct_add_call(object, nested_call = FALSE)
 }
 \arguments{
-\item{object}{An object (numeric, character, list, NULL, or r2ogs6 class object)}
+\item{object}{An object (numeric, character, list, NULL, or r2ogs6 class
+object)}
 
-\item{nested_call}{Optional: For recursion purposes, you should leave this as it is.}
+\item{nested_call}{Optional: For recursion purposes, you should leave this as
+it is.}
 }
 \value{
 A string representing the code with which the component would be added
 to an OGS6 object
 }
 \description{
-Constructs a call based on an OGS6 component. This is a recursive function
-and its feelings are easily hurt. Please handle it with care.
+Constructs a call based on an OGS6 component. This is a
+recursive function, handle with care.
 }
diff --git a/man/delete_nulls_from_str.Rd b/man/delete_nulls_from_str.Rd
new file mode 100644
index 0000000..1828713
--- /dev/null
+++ b/man/delete_nulls_from_str.Rd
@@ -0,0 +1,16 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/generate_benchmark_script.R
+\name{delete_nulls_from_str}
+\alias{delete_nulls_from_str}
+\title{delete_nulls_from_str}
+\usage{
+delete_nulls_from_str(string)
+}
+\arguments{
+\item{string}{A string}
+}
+\description{
+Utility function to delete "param_name = NULL" from a string,
+this isn't necessary for functionality of generate_benchmark_script but will
+make generated scripts way more readable.
+}
diff --git a/man/generate_all_benchmarks.Rd b/man/generate_all_benchmarks.Rd
index 9c82b46..6f2b19d 100644
--- a/man/generate_all_benchmarks.Rd
+++ b/man/generate_all_benchmarks.Rd
@@ -10,12 +10,13 @@ generate_all_benchmarks(
 )
 }
 \arguments{
-\item{path}{Optional: A path to a benchmark directory to generate scripts from
-(defaults to 'extdata/benchmarks' package folder)}
+\item{path}{Optional: A path to a benchmark directory to generate scripts
+from (defaults to 'extdata/benchmarks' package folder)}
 
 \item{dest_dir}{Optional: The directory to write the scripts to
 (defaults to 'extdata/benchmark_scripts' package folder)}
 }
 \description{
-Collector function to generate benchmarks from all .prj files in a directory
+Collector function to generate benchmarks from all .prj files in
+a directory
 }
diff --git a/man/r2ogs6_parameter.Rd b/man/r2ogs6_parameter.Rd
index 478806e..470bb1b 100644
--- a/man/r2ogs6_parameter.Rd
+++ b/man/r2ogs6_parameter.Rd
@@ -4,17 +4,49 @@
 \alias{r2ogs6_parameter}
 \title{r2ogs6_parameter}
 \usage{
-r2ogs6_parameter(name, type, values = NULL, value = NULL)
+r2ogs6_parameter(
+  name,
+  type,
+  value = NULL,
+  values = NULL,
+  curve = NULL,
+  parameter = NULL,
+  group_id_property = NULL,
+  index_values = NULL,
+  field_name = NULL,
+  mesh = NULL,
+  expression = NULL,
+  time_series = NULL,
+  use_local_coordinate_system = NULL
+)
 }
 \arguments{
-\item{name}{The parameter name}
+\item{name}{string:}
 
-\item{type}{The parameter type}
-
-\item{values}{Optional: string | numeric: Parameter values}
+\item{type}{string:}
 
 \item{value}{Optional: string | double: Parameter value}
+
+\item{values}{Optional: string | double: Parameter values}
+
+\item{curve}{Optional: string:}
+
+\item{parameter}{Optional: string:}
+
+\item{group_id_property}{Optional: string:}
+
+\item{index_values}{Optional: list:}
+
+\item{field_name}{Optional: string:}
+
+\item{mesh}{Optional: string:}
+
+\item{expression}{Optional: string:}
+
+\item{time_series}{Optional: list:}
+
+\item{use_local_coordinate_system}{Optional: string, "true" | "false":}
 }
 \description{
-S3 class describing a .prj parameter
+tag: parameter
 }
diff --git a/man/to_node.Rd b/man/to_node.Rd
index 3d8685e..4ef5069 100644
--- a/man/to_node.Rd
+++ b/man/to_node.Rd
@@ -12,17 +12,19 @@ to_node(
 )
 }
 \arguments{
-\item{object}{An object (so far works for r2ogs6 class objects, strings, numbers, lists and vectors)}
+\item{object}{An object (so far works for r2ogs6 class objects, strings,
+numbers, lists and vectors)}
 
 \item{object_name}{Optional: The object name. If not supplied, this function
 will try to guess the tag name by deparsing the 'object' parameter}
 
-\item{attribute_names}{Optional: A character vector containing names of attributes
-or attribute nodes}
+\item{attribute_names}{Optional: A character vector containing names of
+attributes or attribute nodes}
 
-\item{flatten_on_exp}{Optional: This is for vectors which will be flattened to a string in XML}
+\item{flatten_on_exp}{Optional: This is for vectors which will be flattened
+to a string in XML}
 }
 \description{
-Recursive function to restructure objects so xml2::as_xml_document()
-function will convert them to the desired XML format
+Recursive function to restructure objects so
+xml2::as_xml_document() function will convert them to the desired XML format
 }
-- 
GitLab