Skip to content

Commit

Permalink
Merge pull request #262 from toxa81/develop
Browse files Browse the repository at this point in the history
explicitly set the end points
  • Loading branch information
toxa81 authored Sep 17, 2018
2 parents 97b3f35 + 77c6e6a commit 9555d21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/radial_grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ class Radial_grid_pow: public Radial_grid<T>
T t = static_cast<T>(i) / (this->num_points() - 1);
this->x_[i] = rmin__ + (rmax__ - rmin__) * std::pow(t, p__);
}
this->x_[0] = rmin__;
this->x_[num_points__ - 1] = rmax__;
this->init();
std::stringstream s;
s << p__;
Expand Down Expand Up @@ -244,6 +246,8 @@ class Radial_grid_exp: public Radial_grid<T>
T t = static_cast<T>(i) / (this->num_points() - 1);
this->x_[i] = rmin__ * std::pow(rmax__ / rmin__, std::pow(t, p__));
}
this->x_[0] = rmin__;
this->x_[num_points__ - 1] = rmax__;
this->init();
this->name_ = "exponential";
}
Expand Down Expand Up @@ -272,6 +276,8 @@ class Radial_grid_lin_exp: public Radial_grid<T>
// this->x_[i] = rmin__ * (i + std::exp(beta * std::pow(t, 1)));
//}

this->x_[0] = rmin__;
this->x_[num_points__ - 1] = rmax__;
this->init();
this->name_ = "linear_exponential";
}
Expand Down

0 comments on commit 9555d21

Please sign in to comment.