Skip to content

Commit ae6381f

Browse files
committed
Correct a sign error in the derivative of the dielectric profiles
1 parent 0e34a76 commit ae6381f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/green/dielectric_profile/OneLayerErf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class OneLayerErf
6565
* \param[in] point where to evaluate the derivative
6666
*/
6767
double derivative(double point) const {
68-
double factor = (epsilon1_ - epsilon2_) / (width_ * std::sqrt(M_PI));
68+
double factor = (epsilon2_ - epsilon1_) / (width_ * std::sqrt(M_PI));
6969
double t = (point - center_) / width_;
7070
double val = std::exp(-std::pow(t, 2));
7171
return (factor * val); //first derivative of epsilon(r)

src/green/dielectric_profile/OneLayerTanh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class OneLayerTanh
6464
* \param[in] point where to evaluate the derivative
6565
*/
6666
double derivative(double point) const {
67-
double factor = (epsilon1_ - epsilon2_) / (2.0 * width_);
67+
double factor = (epsilon2_ - epsilon1_) / (2.0 * width_);
6868
double tanh_r = std::tanh((point - center_) / width_);
6969
return (factor * (1 - std::pow(tanh_r, 2))); //first derivative of epsilon(r)
7070
}

0 commit comments

Comments
 (0)