ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/parallel/ForceMatrixDecomposition.cpp
(Generate patch)

Comparing:
branches/development/src/parallel/ForceMatrixDecomposition.cpp (file contents), Revision 1767 by gezelter, Fri Jul 6 22:01:58 2012 UTC vs.
trunk/src/parallel/ForceMatrixDecomposition.cpp (file contents), Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC

# Line 1339 | Line 1339 | namespace OpenMD {
1339          for (int j = 0; j < 3; j++) {
1340            scaled[j] -= roundMe(scaled[j]);
1341            scaled[j] += 0.5;
1342 +          // Handle the special case when an object is exactly on the
1343 +          // boundary (a scaled coordinate of 1.0 is the same as
1344 +          // scaled coordinate of 0.0)
1345 +          if (scaled[j] >= 1.0) scaled[j] -= 1.0;
1346          }
1347          
1348          // find xyz-indices of cell that cutoffGroup is in.
# Line 1363 | Line 1367 | namespace OpenMD {
1367          for (int j = 0; j < 3; j++) {
1368            scaled[j] -= roundMe(scaled[j]);
1369            scaled[j] += 0.5;
1370 +          // Handle the special case when an object is exactly on the
1371 +          // boundary (a scaled coordinate of 1.0 is the same as
1372 +          // scaled coordinate of 0.0)
1373 +          if (scaled[j] >= 1.0) scaled[j] -= 1.0;
1374          }
1375          
1376          // find xyz-indices of cell that cutoffGroup is in.
# Line 1389 | Line 1397 | namespace OpenMD {
1397          for (int j = 0; j < 3; j++) {
1398            scaled[j] -= roundMe(scaled[j]);
1399            scaled[j] += 0.5;
1400 +          // Handle the special case when an object is exactly on the
1401 +          // boundary (a scaled coordinate of 1.0 is the same as
1402 +          // scaled coordinate of 0.0)
1403 +          if (scaled[j] >= 1.0) scaled[j] -= 1.0;
1404          }
1405          
1406          // find xyz-indices of cell that cutoffGroup is in.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines