diff --git a/R/accepted_input.R b/R/accepted_input.R deleted file mode 100644 index 9e119bac922554365c62c354ae89757ac020cbb8..0000000000000000000000000000000000000000 --- a/R/accepted_input.R +++ /dev/null @@ -1,8 +0,0 @@ -#This is a helper script providing an overview of some accepted input parameters. - -#============================== .vtu ================================ -vtu_appended_data_valid_encoding_types <- list("binary", "base64") - - -#============================== .prj ================================ -prj_medium_phase_types <- c("Gas", "Solid", "AqueousLiquid", "NonAqueousLiquid") \ No newline at end of file diff --git a/R/generate_functions.R b/R/generate_functions.R deleted file mode 100644 index 09559677c74250b96f6ecf4c06ce7268d357f076..0000000000000000000000000000000000000000 --- a/R/generate_functions.R +++ /dev/null @@ -1,132 +0,0 @@ -#This is a script containing experimental functions which generate other -# functions. -#These will not be exported, but in the best case developers can use them to -# make their workflow more efficient. - -generate_class_from_element <- function(element, export = TRUE) { - - children <- xml2::xml_children(element) - attrs <- xml2::xml_attrs(element) - element_name <- xml2::xml_name(element) - - #Generate name of new class from element name if class_name is not specified - if(is.null(class_name)){ - class_name <- snakecase::to_any_case(element_name, "snake") - } - - - #Start of description - class_str <- paste0("#'r2ogs6_", element_name, "\n", - "#'@description r2ogs6 class representing a ", - element_name, " element \n") - - #Add parameter documentation tag(s) - parameters <- list() - - for(i in seq_len(length(children))){ - parameters <- c(parameters, xml2::xml_name(children[[i]])) - - class_str <- paste0(class_str, "#'@param ", - xml2::xml_name(children[[i]]), - " (Auto generated)\n") - } - - #Add export documentation tag if class should be exported - if(export){ - class_str <- paste0(class_str, "#'@export\n") - } - - #Start of declaration - class_str <- paste0(class_str, "r2ogs6_", element_name, " <- function(\n") - - #ADD PARAMETERS HERE - - class_str <- paste0(class_str, ") {\n") - - #ADD FUNCTION CONTENTS - - class_str <- paste0(class_str, "}\n") - - - generated_class <- structure(list(), class = element_name) - - return(generated_class) -} - - -#============================== READ_IN FUNCTION GENERATOR ===================== - -#'generate_simple_read_in -#'@description Assuming function read_in gets good enough results, this could -#' save code later. -#'@param element_name The name of the .prj element to be read from -#' (wrapper element, e.g. 'processes') -#'@param child_name The name of the element children (e.g. 'process') -#'@param has_name_tag Do the child elements have a child element with the -#' name 'name'? -#'@param subclasses_names Optional: A character vector containing the names -#' of r2ogs6_* -#' subclasses (r2ogs6_* classes without a method for input_add) -generate_simple_read_in <- function(element_name, - child_name, - has_name_tag = TRUE, - subclasses_names = NULL) { - - assertthat::assert_that(assertthat::is.string(element_name)) - assertthat::assert_that(assertthat::is.string(child_name)) - assertthat::assert_that(assertthat::is.flag(has_name_tag)) - - if(!is.null(subclasses_names)){ - assertthat::assert_that(is.character(subclasses_names)) - } - - func_str <- paste0("#'read_in_", element_name, "\n", - "#'@description Reads in ", child_name, - " elements from a .prj file\n", - "#'@param ogs6_obj A OGS6 class object\n", - "#'@param prj_path The path to the project file the ", - child_name, " elements should be read from\n") - - if(has_name_tag){ - func_str <- paste0(func_str, "#'@param ", child_name, - "_names Optional: The names of the ", - child_name, " elements to be read in\n") - }else{ - func_str <- paste0(func_str, "#'@param ", child_name, - "_indices Optional: The indices of the ", - child_name, " elements to be read in\n") - } - - func_str <- paste0(func_str, "#'@export\n", - "read_in_", element_name, - " <- function(ogs6_obj, prj_path, ") - - if(has_name_tag){ - func_str <- paste0(func_str, child_name, "_names = NULL) {\n") - }else{ - func_str <- paste0(func_str, child_name, "_indices = NULL) {\n") - } - - func_str <- paste0(func_str, "read_in(ogs6_obj, prj_path, \"", element_name, - "\", \"", child_name, "\", selection_vector = ") - - if(has_name_tag){ - func_str <- paste0(func_str, child_name, "_names") - }else{ - func_str <- paste0(func_str, child_name, "_indices") - } - - if(!is.null(subclasses_names)){ - subclasses_str <- utils::capture.output( - invisible(dput(subclasses_names))) - subclasses_str <- paste(subclasses_str, collapse = "") - func_str <- paste0(func_str, ", subclasses_names = ", subclasses_str) - } - - func_str <- paste0(func_str, - ")\n", - "}\n") - - cat(func_str) - return(invisible(func_str)) -} \ No newline at end of file diff --git a/R/utils-pipe.R b/R/utils-pipe.R deleted file mode 100644 index e79f3d80856576d6db32c9fb05cdbc02b28f4ff8..0000000000000000000000000000000000000000 --- a/R/utils-pipe.R +++ /dev/null @@ -1,11 +0,0 @@ -#' Pipe operator -#' -#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. -#' -#' @name %>% -#' @rdname pipe -#' @keywords internal -#' @export -#' @importFrom magrittr %>% -#' @usage lhs \%>\% rhs -NULL diff --git a/man/generate_simple_read_in.Rd b/man/generate_simple_read_in.Rd deleted file mode 100644 index 13283e7d56ab210f93c1fe986b0054e1215e9c3b..0000000000000000000000000000000000000000 --- a/man/generate_simple_read_in.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/generate_functions.R -\name{generate_simple_read_in} -\alias{generate_simple_read_in} -\title{generate_simple_read_in} -\usage{ -generate_simple_read_in( - element_name, - child_name, - has_name_tag = TRUE, - subclasses_names = NULL -) -} -\arguments{ -\item{element_name}{The name of the .prj element to be read from (wrapper element, e.g. 'processes')} - -\item{child_name}{The name of the element children (e.g. 'process')} - -\item{has_name_tag}{Do the child elements have a child element with the name 'name'?} - -\item{subclasses_names}{Optional: A character vector containing the names of r2ogs6_* -subclasses (r2ogs6_* classes without a method for input_add)} -} -\description{ -Assuming function read_in gets good enough results, this could save code later. -} diff --git a/man/get_value_types.Rd b/man/get_value_types.Rd deleted file mode 100644 index 7ffe582287db4564926fdd02a77fb88a0f83d908..0000000000000000000000000000000000000000 --- a/man/get_value_types.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{get_value_types} -\alias{get_value_types} -\title{get_value_types} -\usage{ -get_value_types(xml_node) -} -\arguments{ -\item{xml_node}{An XML node (of class xml2::xml_node)} -} -\description{ -Gets the type of an XML value based on the documentation -(per default, XML values are read in as a string, but for many elements, -we want to coerce them to double) -} diff --git a/man/new_r2ogs6_curve.Rd b/man/new_r2ogs6_curve.Rd deleted file mode 100644 index cec545b7c3048c2bda18a2dd138479c13edab9b5..0000000000000000000000000000000000000000 --- a/man/new_r2ogs6_curve.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prj_curve.R -\name{new_r2ogs6_curve} -\alias{new_r2ogs6_curve} -\title{new_r2ogs6_curve} -\usage{ -new_r2ogs6_curve(name, coords, values) -} -\arguments{ -\item{name}{The name of the curve} - -\item{coords}{Coordinates at which the curve's values are given} - -\item{values}{Values of the curve at the given coordinates} -} -\description{ -Constructor for S3 class r2ogs6_curve -} diff --git a/man/r2ogs6_medium_phase.Rd b/man/r2ogs6_medium_phase.Rd deleted file mode 100644 index f92afb7a2c1cb0ca952a74573181fdabae18e4af..0000000000000000000000000000000000000000 --- a/man/r2ogs6_medium_phase.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prj_medium.R -\name{r2ogs6_medium_phase} -\alias{r2ogs6_medium_phase} -\title{r2ogs6_medium_phase} -\usage{ -r2ogs6_medium_phase(type, properties) -} -\arguments{ -\item{type}{A string specifying the medium type (one of "Gas", "Solid", "AqueousLiquid" and "NonAqueousLiquid")} - -\item{properties}{A list of properties (see ?r2ogs6_medium_property for more info)} -} -\description{ -S3 class describing a .prj medium phase (a coherent material with homogeneous properties) -} diff --git a/man/r2ogs6_medium_property.Rd b/man/r2ogs6_medium_property.Rd deleted file mode 100644 index ef8583652190ee70fdbb8663d8e58021ed0c38c4..0000000000000000000000000000000000000000 --- a/man/r2ogs6_medium_property.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prj_medium.R -\name{r2ogs6_medium_property} -\alias{r2ogs6_medium_property} -\title{r2ogs6_medium_property} -\usage{ -r2ogs6_medium_property(name, type, value = NULL, ...) -} -\arguments{ -\item{name}{A string specifying the property name} - -\item{type}{A string specifying the property type} - -\item{value}{A string ...} - -\item{...}{...} -} -\description{ -S3 class describing a .prj medium property (a constitutive property) (WIP!) -} diff --git a/man/r2ogs6_tl_output.Rd b/man/r2ogs6_tl_output.Rd deleted file mode 100644 index dbd327dfcd3843dbf84b032bfc86195df10ae25a..0000000000000000000000000000000000000000 --- a/man/r2ogs6_tl_output.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prj_time_loop.R -\name{r2ogs6_tl_output} -\alias{r2ogs6_tl_output} -\title{r2ogs6_tl_output} -\usage{ -r2ogs6_tl_output( - type, - prefix, - suffix, - timesteps, - variables, - compress_output = NULL -) -} -\arguments{ -\item{type}{...} - -\item{prefix}{...} - -\item{suffix}{...} - -\item{timesteps}{...} - -\item{variables}{...} - -\item{compress_output}{Optional: Should the output be compressed?} -} -\description{ -S3 class describing a .prj time_loop output -} diff --git a/man/read_in_curves.Rd b/man/read_in_curves.Rd deleted file mode 100644 index 29c7e6cf81a72c95287b2ae6e1d3272f2318c659..0000000000000000000000000000000000000000 --- a/man/read_in_curves.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_curves} -\alias{read_in_curves} -\title{read_in_curves} -\usage{ -read_in_curves(ogs6_obj, prj_path, curve_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the curve elements should be read from} - -\item{curve_names}{Optional: The names of the curve elements to be read in} -} -\description{ -Reads in curve elements from a .prj file -} diff --git a/man/read_in_linear_solvers.Rd b/man/read_in_linear_solvers.Rd deleted file mode 100644 index 584247b7d755ded6f916afeac6c658113af4f903..0000000000000000000000000000000000000000 --- a/man/read_in_linear_solvers.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_linear_solvers} -\alias{read_in_linear_solvers} -\title{read_in_linear_solvers} -\usage{ -read_in_linear_solvers(ogs6_obj, prj_path, linear_solver_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the linear_solver elements should be read from} - -\item{linear_solver_names}{Optional: The names of the linear_solver elements to be read in} -} -\description{ -Reads in linear_solver elements from a .prj file -} diff --git a/man/read_in_media.Rd b/man/read_in_media.Rd deleted file mode 100644 index ee48fdc835e65465ad5864677fb1b16fa92b17d9..0000000000000000000000000000000000000000 --- a/man/read_in_media.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_media} -\alias{read_in_media} -\title{read_in_media} -\usage{ -read_in_media(ogs6_obj, prj_path, medium_indices = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the medium elements should be read from} - -\item{medium_indices}{Optional: The indices of the medium elements to be read in} -} -\description{ -Reads in medium elements from a .prj file -} diff --git a/man/read_in_nonlinear_solvers.Rd b/man/read_in_nonlinear_solvers.Rd deleted file mode 100644 index bbdfc1b8f107dbc98ee952967bd643efb6d36f96..0000000000000000000000000000000000000000 --- a/man/read_in_nonlinear_solvers.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_nonlinear_solvers} -\alias{read_in_nonlinear_solvers} -\title{read_in_nonlinear_solvers} -\usage{ -read_in_nonlinear_solvers(ogs6_obj, prj_path, nonlinear_solver_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the nonlinear_solver elements should be read from} - -\item{nonlinear_solver_names}{Optional: The names of the nonlinear_solver elements to be read in} -} -\description{ -Reads in nonlinear_solver elements from a .prj file -} diff --git a/man/read_in_parameters.Rd b/man/read_in_parameters.Rd deleted file mode 100644 index 8fd76faea7f239d3d90ea20d4894386d9973aa5e..0000000000000000000000000000000000000000 --- a/man/read_in_parameters.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_parameters} -\alias{read_in_parameters} -\title{read_in_parameters} -\usage{ -read_in_parameters(ogs6_obj, prj_path, parameter_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the parameter elements should be read from} - -\item{parameter_names}{Optional: The names of the parameter elements to be read in} -} -\description{ -Reads in parameter elements from a .prj file -} diff --git a/man/read_in_process_variables.Rd b/man/read_in_process_variables.Rd deleted file mode 100644 index 92c255e11af162858c4962c18b8dab8bcfabad34..0000000000000000000000000000000000000000 --- a/man/read_in_process_variables.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_process_variables} -\alias{read_in_process_variables} -\title{read_in_process_variables} -\usage{ -read_in_process_variables(ogs6_obj, prj_path, process_variable_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the process_variable elements should be read from} - -\item{process_variable_names}{Optional: The names of the process_variable elements to be read in} -} -\description{ -Reads in process_variable elements from a .prj file -} diff --git a/man/read_in_processes.Rd b/man/read_in_processes.Rd deleted file mode 100644 index cbb060cf7ae567abdfab4551a50ddd905cb708ee..0000000000000000000000000000000000000000 --- a/man/read_in_processes.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_processes} -\alias{read_in_processes} -\title{read_in_processes} -\usage{ -read_in_processes(ogs6_obj, prj_path, process_names = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the process elements should be read from} - -\item{process_names}{Optional: The names of the process elements to be read in} -} -\description{ -Reads in process elements from a .prj file -} diff --git a/man/read_in_test_definition.Rd b/man/read_in_test_definition.Rd deleted file mode 100644 index e0c538a365582d6efc5a47b71c94ca5758afe629..0000000000000000000000000000000000000000 --- a/man/read_in_test_definition.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_test_definition} -\alias{read_in_test_definition} -\title{read_in_test_definition} -\usage{ -read_in_test_definition(ogs6_obj, prj_path, vtkdiff_indices = NULL) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the vtkdiff elements should be read from} - -\item{vtkdiff_indices}{Optional: The indices of the vtkdiff elements to be read in} -} -\description{ -Reads in vtkdiff elements from a .prj file -} diff --git a/man/read_in_time_loop.Rd b/man/read_in_time_loop.Rd deleted file mode 100644 index 5f325422509c0ffa36ca06f30f947596eaff572f..0000000000000000000000000000000000000000 --- a/man/read_in_time_loop.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/read_in_prj.R -\name{read_in_time_loop} -\alias{read_in_time_loop} -\title{read_in_time_loop} -\usage{ -read_in_time_loop(ogs6_obj, prj_path) -} -\arguments{ -\item{ogs6_obj}{A OGS6 class object} - -\item{prj_path}{The path to the project file the time_loop element should be read from} -} -\description{ -Reads in time_loop element from a .prj file -}