| version 1.8 | version 1.9 |
|---|
| |
| #include "HomePatch.h" | #include "HomePatch.h" |
| #include "Molecule.h" | #include "Molecule.h" |
| | |
| #define MIN_DEBUG_LEVEL 2 | #define MIN_DEBUG_LEVEL 4 |
| //#define DEBUGM | //#define DEBUGM |
| #include "Debug.h" | #include "Debug.h" |
| | |
| |
| } | } |
| | |
| // Force force = scale * Tensor::diagonal(simParams->gridforceScale) * charge * (inv * f); | // Force force = scale * Tensor::diagonal(simParams->gridforceScale) * charge * (inv * f); |
| Force force = scale * Tensor::diagonal(simParams->gridforceScale) * charge * (f * grid->get_inv()); // Must multiply ON THE RIGHT by inv tensor | // Force force = scale * Tensor::diagonal(simParams->gridforceScale) * charge * (f * grid->get_inv()); // Must multiply ON THE RIGHT by inv tensor |
| | Force force = scale * box.scale * charge * (f * grid->get_inv()); // Must multiply ON THE RIGHT by inv tensor |
| | |
| DebugM(4, "f4 = " << f << "\n" << endi); | DebugM(4, "f4 = " << f << "\n" << endi); |
| DebugM(4, "force4 = " << force << "\n" << endi); | DebugM(4, "force4 = " << force << "\n" << endi); |
| |
| && simParams->gridforceScale.x == simParams->gridforceScale.z) | && simParams->gridforceScale.x == simParams->gridforceScale.z) |
| { | { |
| // only makes sense when scaling is isotropic | // only makes sense when scaling is isotropic |
| energy += v * scale * simParams->gridforceScale.x; | energy += v * charge * scale * simParams->gridforceScale.x; |
| } | } |
| extVirial += outer(force,vpos); | extVirial += outer(force,vpos); |
| } | } |