Skip to content

Commit

Permalink
updated docs for cran submission
Browse files Browse the repository at this point in the history
  • Loading branch information
cneyens committed Aug 1, 2024
1 parent 6052ccd commit 955f0e3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ Title: Analytic Element Modeling of Steady Single-Layer Groundwater Flow
Version: 0.1.0
Authors@R:
person("Cas", "Neyens", , "[email protected]", role = c("aut", "cre", "cph"))
Description: Analytic element modeling of steady-state, single-layer
groundwater flow under the 'Dupuit-Forchheimer' assumption. Elements
such as wells, area-sinks and line-sinks can be placed at arbitrary
Description: A model of single-layer groundwater flow in steady-state
under the Dupuit-Forchheimer assumption can be created by placing
elements such as wells, area-sinks and line-sinks at arbitrary
locations in the flow field. Output variables include hydraulic head
and the discharge vector. Particle traces can be computed numerically
in three dimensions.
in three dimensions. The underlying theory is described in Haitjema
(1995) <doi:10.1016/B978-0-12-316550-3.X5000-4> and references
therein.
License: MIT + file LICENSE
URL: https://github.com/cneyens/raem, https://cneyens.github.io/raem/
BugReports: https://github.com/cneyens/raem/issues
Expand Down
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ image_to_matrix <- function(m) {
#' @details [contours()] is a wrapper around [contour()]. It obtains the values of `variable` at
#' the grid points defined by marginal vectors `x` and `y` and constructs the matrix supplied to [contour()] by reversing the rows and
#' transposing the matrix (see also the documentation of [image()]).
#'
#' @return A contour plot of the selected variable.
#' @export
#' @importFrom graphics contour
#' @seealso [aem()] [contour()] [image()] [heads()]
Expand Down
13 changes: 10 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
## Resubmission
This is a resubmission. In this version I have:

* Reduced the elapsed time of some examples.
* Removed single quotes around words in the description.

* Updated the description to not start with the title.

* Added a general reference to analytic element modeling theory in the description field.

* Added a \value field to contours.Rd.

* Removed the setting of graphical parameters using par() in the vignettes.


* Handled words flagged as possibly misspelled in DESCRIPTION.

## R CMD check results

0 errors | 0 warnings | 1 note
Expand Down
3 changes: 3 additions & 0 deletions man/contours.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions vignettes/vign-01-overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ As an example, an analytic element model is created for a phreatic system with t

The `add_element()` function is used to add elements to an initially empty model. After all the elements are added, the model needs to be solved with an explicit call to `solve.aem()`. This is useful for adding elements to a model in a loop or pipeline.

A major benefit of the AEM approach is that no numerical grid of the domain is needed. This allows to zoom in on an area of interest without altering or rerunning the model, as illustrated by the plot of the inset area around well A (green rectangular in the first plot).

```{r example-model, fig.show="hold", out.width="75%"}
```{r example-model, fig.show="hold"}
# aquifer parameters ----
k = 15 # hydraulic conductivity, m/d
top = 20 # aquifer top elevation, m
Expand Down Expand Up @@ -328,8 +326,6 @@ for(i in seq(nls - 1)) {
m = solve(m)
# view head contours ----
par(mar = c(4, 4, .3, .3))
xg = seq(-800, 300, length = 100)
yg = seq(-600, 300, length = 100)
Expand All @@ -339,6 +335,12 @@ plot(m, add = TRUE)
polygon(x = c(-500, 50, 50, -500), y = c(-200, -200, 150, 150), border = 'forestgreen')
grid() # add gridlines to plot
```

A major benefit of the AEM approach is that no numerical grid of the domain is needed. This allows to zoom in on an area of interest without altering or rerunning the model, as illustrated by the plot of the inset area around well A (green rectangular in the first plot).

```{r fig-inset-well}
# view inset near well A
xg = seq(-500, 50, length = 100)
yg = seq(-200, 150, length = 100)
Expand Down Expand Up @@ -376,7 +378,6 @@ To plot a cross-section of the water-table, simply compute the head values at th
xprofile = seq(-800, 400, length = 1000)
hprofile = heads(m, x = xprofile, y = -100)
par(mar=c(4, 4, 0.3, 0.3))
plot(xprofile, hprofile, type = 'l', xlab = 'x (m)', ylab = 'head (m)')
```

Expand Down

0 comments on commit 955f0e3

Please sign in to comment.