Skip to content

Commit

Permalink
index out of bound in boulton_solution_space (cpp code) fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
khaors committed May 22, 2019
1 parent 3c8c289 commit 59ad723
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ language: R
sudo: false
cache: packages

r_build_args: "--no-manual --no-resave-data"
r_build_args: "--no-manual --no-resave-data"
r_check_args: "--no-build-vignettes --no-manual --timings"

before_install:
- sudo apt-get install libgslcblas0
- sudo apt-get install libgslcblas0
- sudo add-apt-repository -y ppa:texlive-backports/ppa
- Rscript -e 'update.packages(ask = FALSE)'
5 changes: 3 additions & 2 deletions src/pumpingtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,17 +739,18 @@ NumericVector boulton_solution_space(const double& Q, const double& x0,
const double& ymax){
NumericVector dist(nx*ny), u(nx*ny), td(nx*ny), drawdown(nx*ny);
dist = calculate_distance_well(x0,y0,nx,ny,xmin,xmax,ymin,ymax);
//std::cout << dist << std::endl;
double Tr, Ss, Sy, alpha1;
NumericVector W(nx*ny), phi(nx*ny), sigma(1), par3(1);
Tr = hydrpar[0];
Ss = hydrpar[1];
Sy = hydrpar[2];
alpha1 = hydrpar[3];
sigma(1) = Ss/Sy;
sigma[0] = Ss/Sy;
phi = (alpha1*dist*dist*Ss)/(Tr);
u = (Ss*dist*dist)/(4.0*Tr*t);
td = 1.0/u;
par3(1)=0.0;
par3[0]=0.0;
W = boulton_well_function_vector_cpp(td, phi, sigma, par3);
drawdown = (Q/(4.0*M_PI*Tr))*W;
return(drawdown);
Expand Down

0 comments on commit 59ad723

Please sign in to comment.