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
87d81cf8
Commit
87d81cf8
authored
4 years ago
by
Ruben Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
[base] Added logfile parameter for OGS6 objects
parent
b2dba87e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
Merge branch 7 fixed functionality into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/ogs6.R
+32
-4
32 additions, 4 deletions
R/ogs6.R
with
32 additions
and
4 deletions
R/ogs6.R
+
32
−
4
View file @
87d81cf8
...
@@ -24,9 +24,9 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -24,9 +24,9 @@ OGS6 <- R6::R6Class("OGS6",
test_mode
=
FALSE
)
{
test_mode
=
FALSE
)
{
# Basic validation
# Basic validation
assertthat
::
assert_that
(
assertthat
::
is.string
(
sim_name
))
assertthat
::
assert_that
(
assertthat
::
is.number
(
sim_id
))
assertthat
::
assert_that
(
assertthat
::
is.number
(
sim_id
))
self
$
sim_name
<-
sim_name
self
$
sim_path
<-
sim_path
self
$
sim_path
<-
sim_path
if
(
!
test_mode
){
if
(
!
test_mode
){
...
@@ -198,6 +198,16 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -198,6 +198,16 @@ OGS6 <- R6::R6Class("OGS6",
return
(
invisible
(
flag
))
return
(
invisible
(
flag
))
},
},
#'print_log
#'@description Prints logfile to console (if it exists)
print_log
=
function
(){
if
(
!
is.null
(
self
$
logfile
)){
writeLines
(
readLines
(
self
$
logfile
))
}
else
{
cat
(
"There is no logfile associated with this OGS6 object.\n"
)
}
},
#'@description
#'@description
#'Clears components from the OGS6 object
#'Clears components from the OGS6 object
#'@param which character: The names of the components (all by default).
#'@param which character: The names of the components (all by default).
...
@@ -240,9 +250,14 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -240,9 +250,14 @@ OGS6 <- R6::R6Class("OGS6",
active
=
list
(
active
=
list
(
#'@field sim_name
#'@field sim_name
#'Getter for OGS6 private parameter '.sim_name'
#'Access to private parameter '.sim_name'
sim_name
=
function
()
{
sim_name
=
function
(
value
)
{
private
$
.sim_name
if
(
missing
(
value
))
{
private
$
.sim_name
}
else
{
assertthat
::
assert_that
(
assertthat
::
is.string
(
value
))
private
$
.sim_name
<-
value
}
},
},
#'@field sim_id
#'@field sim_id
...
@@ -262,6 +277,17 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -262,6 +277,17 @@ OGS6 <- R6::R6Class("OGS6",
}
}
},
},
#'@field logfile
#'Access to private parameter '.logfile'
logfile
=
function
(
value
)
{
if
(
missing
(
value
))
{
private
$
.logfile
}
else
{
assertthat
::
assert_that
(
assertthat
::
is.string
(
value
))
private
$
.logfile
<-
value
}
},
#'@field ogs_bin_path
#'@field ogs_bin_path
#'Getter for OGS6 private parameter '.ogs_bin_path'
#'Getter for OGS6 private parameter '.ogs_bin_path'
ogs_bin_path
=
function
()
{
ogs_bin_path
=
function
()
{
...
@@ -448,6 +474,8 @@ OGS6 <- R6::R6Class("OGS6",
...
@@ -448,6 +474,8 @@ OGS6 <- R6::R6Class("OGS6",
.sim_path
=
NULL
,
.sim_path
=
NULL
,
.ogs_bin_path
=
NULL
,
.ogs_bin_path
=
NULL
,
.logfile
=
NULL
,
#.gml parameters
#.gml parameters
.gml
=
NULL
,
.gml
=
NULL
,
...
...
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