Skip to content
Snippets Groups Projects
Commit b15deec9 authored by Johannes Boog's avatar Johannes Boog
Browse files

[doc] add example in README

parent 2c80e7b1
No related branches found
No related tags found
1 merge request!65Resolve "bugfix test failures"
...@@ -158,6 +158,43 @@ environment that you configured. ...@@ -158,6 +158,43 @@ environment that you configured.
## Usage ## Usage
To quickly test if your set up works just run a benchmark shipped with the
package.
Remember that if you closed your R session in between you may have to reset the
`ogs_bin_path` by ```set_ogs6_bin_path()```.
Now you can setup an example by:
```
sim_path <- tempdir()
# Create new ogs object
ogs6_obj <- OGS6$new(
sim_name = "my_simulation",
sim_path = sim_path
)
# Read in a project setup file
prj_path <- system.file(
"extdata/benchmarks/flow_no_strain/flow_no_strain.prj",
package = "r2ogs6"
)
read_in_prj(ogs6_obj, prj_path = prj_path, read_in_gml = T)
```
Just start the simulation, check if it succeeds (returns a "0" exit status) and
hav a look at the output.
```
ogs6_run_simulation(ogs6_obj)
ogs6_read_output_files(ogs6_obj)
result_df <- ogs6_obj$pvds[[1]]$get_point_data(keys = c("pressure"))
result_df
```
## Further Reading
For tutorials on how to use the `r2ogs6` package, have a look at its vignettes: For tutorials on how to use the `r2ogs6` package, have a look at its vignettes:
* [User Guide](vignettes/user_workflow_vignette.Rmd) * [User Guide](vignettes/user_workflow_vignette.Rmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment