Skip to content

Commit 95a57e8

Browse files
committed
fix : fix bug in module_surchem/efield.cpp
1 parent 6364f7a commit 95a57e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_surchem/efield.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ModuleBase::matrix Efield::add_efield(const UnitCell &cell,
4343
bvec[2] = cell.G.e23;
4444
latvec = cell.a2.norm();
4545
}
46-
else if(efield_dir = 2)
46+
else if(efield_dir == 2)
4747
{
4848
bvec[0] = cell.G.e31;
4949
bvec[1] = cell.G.e32;
@@ -183,7 +183,7 @@ double Efield::saw_function(const double &a, const double &b, const double &x)
183183

184184
const double fac = 1 - b;
185185

186-
if( x < a )
186+
if( x <= a )
187187
{
188188
return x - a + 0.5 * fac;
189189
}

0 commit comments

Comments
 (0)