Changeset 1a92cf for src/interface/interface_particles.cpp
- Timestamp:
- Apr 29, 2012, 10:50:41 AM (14 years ago)
- Children:
- 39a6d9
- Parents:
- 4571da
- File:
-
- 1 edited
-
src/interface/interface_particles.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/interface/interface_particles.cpp
r4571da r1a92cf 101 101 { 102 102 Index i; 103 vmg_float length;104 103 105 104 #ifdef DEBUG_OUTPUT … … 161 160 for (p1=lc_1.begin(); p1!=lc_1.end(); ++p1) { 162 161 163 (*p1)->Pot() = ip.Evaluate((*p1)->Pos()) - (*p1)->Charge() * spl.GetAntiDerivativeAtZero(); 162 ip.Evaluate((*p1)->Pos(), (*p1)->Pot(), (*p1)->Field()); 163 (*p1)->Pot() -= (*p1)->Charge() * spl.GetAntiDerivativeAtZero(); 164 164 165 165 #ifdef DEBUG_OUTPUT … … 177 177 if (*p1 != *p2) { 178 178 179 length = ((*p2)->Pos() - (*p1)->Pos()).Length(); 179 const Vector dir = (*p1)->Pos() - (*p2)->Pos(); 180 const vmg_float length = dir.Length(); 180 181 181 182 if (length < r_cut) { 183 182 184 (*p1)->Pot() += (*p2)->Charge() / length * (1.0 + spl.EvaluatePotential(length)); 185 (*p1)->Field() += (*p2)->Charge() * dir * spl.EvaluateField(length); 183 186 184 187 #ifdef DEBUG_OUTPUT
Note:
See TracChangeset
for help on using the changeset viewer.
