Skip to content
Snippets Groups Projects

3 port rcpp tug

Open Marco De Lucia requested to merge 3-port-RcppTUG into master
3 files
+ 7
4
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
3
## Functions for RT simulations using through RcppBTCS's diffusion
### Marco De Lucia, delucia@gfz-potsdam.de, 2009-2022
### Time-stamp: "Last modified 2022-10-04 16:00:31 delucia"
### Time-stamp: "Last modified 2022-10-04 17:24:58 delucia"
##' This function is somehow equivalent to
##' \code{phreeqc::phrGetSelectedOutput} but it won't call
@@ -351,7 +351,7 @@ DiffusionScheme <- function(conc, inflow, dx, dt, alpha, scheme, transported) {
cnew[,sp] <- FTCS(tmp, dx, dt, alpha, bc_left=inflow[sp])
}
} else {
msg("Diffusing totrans=", paste(totrans, collapse = "; "))
## msg("Diffusing totrans=", paste(totrans, collapse = "; "))
for (sp in totrans) {
## msg("Diffusing names(inflow[sp])", names(inflow[sp]), "bc_left=", inflow[sp])
## msg("Colnames(cnew)=", paste(colnames(cnew), collapse = "; "))
@@ -387,6 +387,7 @@ DiffusionScheme <- function(conc, inflow, dx, dt, alpha, scheme, transported) {
##' @param dt the required time step in s
##' @param alpha diffusion coefficient in m^2/s (constant,
##' homogeneous)
##' @param bc_left Dirichlet boundary condition at the left inlet
##' @return updated concentration vector
##' @author MDL
##' @export
@@ -412,7 +413,7 @@ BTCS <- function(field, dx, dt, alpha, bc_left) {
##' @param dt the required time step in s
##' @param alpha diffusion coefficient in m^2/s (constant,
##' homogeneous)
##' @param bc_left Dirichlet boundary conditions on the left margin
##' @param bc_left Dirichlet boundary conditions at the left inlet
##' @return updated concentration vector
##' @author MDL
##' @export
Loading