Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
r2ogs6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
OpenGeoSys Tools
r2ogs6
Commits
6acbb105
Commit
6acbb105
authored
4 years ago
by
Ruben Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
Modified class structure
parent
a79d1107
No related branches found
No related tags found
4 merge requests
!5
7 vtkdiff
,
!4
7 parameter
,
!3
7 process borehole heat exchanger
,
!2
Basic import and export functionality
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/ogs6.R
+11
-10
11 additions, 10 deletions
R/ogs6.R
with
11 additions
and
10 deletions
R/ogs6.R
+
11
−
10
View file @
6acbb105
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#'@param sim_id The ID of the simulation
#'@param sim_id The ID of the simulation
#'@param sim_path The path where all relevant files for the simulation will be saved
#'@param sim_path The path where all relevant files for the simulation will be saved
#'@param ogs_bin_path Path to OpenGeoSys6 /bin directory
#'@param ogs_bin_path Path to OpenGeoSys6 /bin directory
#'@export
OGS6
<-
R6
::
R6Class
(
"OGS6"
,
OGS6
<-
R6
::
R6Class
(
"OGS6"
,
public
=
list
(
public
=
list
(
...
@@ -65,7 +66,7 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -65,7 +66,7 @@ OGS6 <- R6::R6Class("OGS6",
add_process
=
function
(
process
){
add_process
=
function
(
process
){
assertthat
::
assert_that
(
class
(
process
)
==
"r2ogs6_process"
)
assertthat
::
assert_that
(
class
(
process
)
==
"r2ogs6_process"
)
private
$
.processes
<-
c
(
private
$
.processes
,
process
)
private
$
.processes
<-
c
(
private
$
.processes
,
list
(
process
)
)
},
},
add_time_loop
=
function
(
time_loop
){
add_time_loop
=
function
(
time_loop
){
...
@@ -79,37 +80,37 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -79,37 +80,37 @@ OGS6 <- R6::R6Class("OGS6",
add_medium
=
function
(
medium
){
add_medium
=
function
(
medium
){
assertthat
::
assert_that
(
class
(
medium
)
==
"r2ogs6_medium"
)
assertthat
::
assert_that
(
class
(
medium
)
==
"r2ogs6_medium"
)
private
$
.media
<-
c
(
private
$
.media
,
medium
)
private
$
.media
<-
c
(
private
$
.media
,
list
(
medium
)
)
},
},
add_parameter
=
function
(
parameter
){
add_parameter
=
function
(
parameter
){
assertthat
::
assert_that
(
class
(
parameter
)
==
"r2ogs6_parameter"
)
assertthat
::
assert_that
(
class
(
parameter
)
==
"r2ogs6_parameter"
)
private
$
.parameters
<-
c
(
private
$
.parameters
,
parameter
)
private
$
.parameters
<-
c
(
private
$
.parameters
,
list
(
parameter
)
)
},
},
add_curve
=
function
(
curve
){
add_curve
=
function
(
curve
){
assertthat
::
assert_that
(
class
(
curve
)
==
"r2ogs6_curve"
)
assertthat
::
assert_that
(
class
(
curve
)
==
"r2ogs6_curve"
)
private
$
.curves
<-
c
(
private
$
.curves
,
curve
)
private
$
.curves
<-
c
(
private
$
.curves
,
list
(
curve
)
)
},
},
add_process_variable
=
function
(
process_variable
){
add_process_variable
=
function
(
process_variable
){
assertthat
::
assert_that
(
class
(
process_variable
)
==
"r2ogs6_process_variable"
)
assertthat
::
assert_that
(
class
(
process_variable
)
==
"r2ogs6_process_variable"
)
private
$
.process_variables
<-
c
(
private
$
.process_variables
,
process_variable
)
private
$
.process_variables
<-
c
(
private
$
.process_variables
,
list
(
process_variable
)
)
},
},
add_nonlinear_solver
=
function
(
nonlinear_solver
){
add_nonlinear_solver
=
function
(
nonlinear_solver
){
assertthat
::
assert_that
(
class
(
nonlinear_solver
)
==
"r2ogs6_nonlinear_solver"
)
assertthat
::
assert_that
(
class
(
nonlinear_solver
)
==
"r2ogs6_nonlinear_solver"
)
private
$
.nonlinear_solvers
<-
c
(
private
$
.nonlinear_solvers
,
nonlinear_solver
)
private
$
.nonlinear_solvers
<-
c
(
private
$
.nonlinear_solvers
,
list
(
nonlinear_solver
)
)
},
},
add_linear_solver
=
function
(
linear_solver
){
add_linear_solver
=
function
(
linear_solver
){
assertthat
::
assert_that
(
class
(
linear_solver
)
==
"r2ogs6_linear_solver"
)
assertthat
::
assert_that
(
class
(
linear_solver
)
==
"r2ogs6_linear_solver"
)
private
$
.linear_solvers
<-
c
(
private
$
.linear_solvers
,
linear_solver
)
private
$
.linear_solvers
<-
c
(
private
$
.linear_solvers
,
list
(
linear_solver
)
)
},
},
add_vtkdiff
=
function
(
vtkdiff
){
add_vtkdiff
=
function
(
vtkdiff
){
assertthat
::
assert_that
(
class
(
vtkdiff
)
==
"r2ogs6_vtkdiff"
)
assertthat
::
assert_that
(
class
(
vtkdiff
)
==
"r2ogs6_vtkdiff"
)
private
$
.test_definition
<-
c
(
private
$
.test_definition
,
vtkdiff
)
private
$
.test_definition
<-
c
(
private
$
.test_definition
,
list
(
vtkdiff
)
)
},
},
get_status
=
function
(){
get_status
=
function
(){
...
@@ -135,8 +136,8 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -135,8 +136,8 @@ OGS6 <- R6::R6Class("OGS6",
if
(
flag
){
if
(
flag
){
cat
(
paste0
(
"Your simulation object has all necessary components.\n"
,
cat
(
paste0
(
"Your simulation object has all necessary components.\n"
,
"You can try to start the simulation by calling run_simulation() on your OGS6 object.\n"
,
"
"You can try to start the simulation by calling run_simulation() on your OGS6 object.\n"
,
Note that this will call more validation functions so you may not be done just yet.\n"
))
"
Note that this will call more validation functions so you may not be done just yet.\n"
))
}
}
return
(
invisible
(
flag
))
return
(
invisible
(
flag
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment