Commit 6d0ae844 authored by phit0's avatar phit0
Browse files

[doc] vignette paragraph for hdf5 files

parent 65b5c763
Pipeline #7367 passed with stage
in 3 minutes and 33 seconds
title: "r2ogs6 User Guide"
author: "Ruben Heinrich"
output: html_document
#output: rmarkdown::html_vignette
#vignette: >
# %\VignetteIndexEntry{r2ogs6 User Guide}
# %\VignetteEngine{knitr::rmarkdown}
# %\VignetteEncoding{UTF-8}
#output: html_document
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{r2ogs6 User Guide}
```{r, include = FALSE}
......@@ -163,6 +163,33 @@ ggplot(result_df,
```{r, echo=FALSE, results='hide'}
ogs6_obj$h5s <- list(OGS6_h5$new(system.file("/extdata/benchmarks/EllipticPETSc",
package = "r2ogs6")))
Similar to the idea with `.pvd` output, `hdf5` files are automatically referenced under `$h5s` if returned by the simulation.
As can be seen, hdf5 files have a very particular structure. To work with the data, a simple method `get_h5()` allows to access the different data elements as a very raw starting point for post processing the data.
h5_list <- ogs6_obj$h5s[[1]]$get_h5("/")
If the file has a reasonably "clean" structure, a more convenient way of importing the data is using the method `get_df` that returns a *tibble* table.
df <- ogs6_obj$h5s[[1]]$get_df(group = "/t_0", names = "pressure")
## Running multiple simulations
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment