Skip to content

Commit

Permalink
remove edge effect
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Aug 12, 2021
1 parent 1f79529 commit 63a840d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ std::vector<double> do_terrains(std::vector<double> d, std::vector<int> dim, std

for (size_t i=0; i<2; i++) {
yw[i] = yw[i] / (2 * dy);
}
}
for (size_t i = ncol; i < (ncol * (nrow-1)-1); i++) {
if (i % ncol == 0) {
q = i / ncol;
Expand Down Expand Up @@ -230,6 +230,7 @@ std::vector<double> do_terrains(std::vector<double> d, std::vector<int> dim, std

for (size_t i=0; i<6; i++) {
yw[i] = yw[i] / (8 * dy);
xw[i] = xwi[i] / (-8 * ddx[1]);
}

for (size_t i = ncol+1; i < (ncol * (nrow-1)-1); i++) {
Expand Down Expand Up @@ -293,6 +294,7 @@ std::vector<double> do_terrains(std::vector<double> d, std::vector<int> dim, std

for (size_t i=0; i<6; i++) {
yw[i] = yw[i] / (8 * dy);
xw[i] = xwi[i] / (-8 * ddx[1]);
}

for (size_t i = ncol+1; i < (ncol * (nrow-1)-1); i++) {
Expand Down

0 comments on commit 63a840d

Please sign in to comment.