Commit cfb23533 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #321 from akohlmey/improve-coulomb-table-accuracy

Improve lookup table accuracy
parents b2ef9521 bd49f4d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ void PairLJClass2CoulLong::compute(int eflag, int vflag)
            rsq_lookup.f = rsq;
            itable = rsq_lookup.i & ncoulmask;
            itable >>= ncoulshiftbits;
            fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
            fraction = (rsq - rtable[itable]) * drtable[itable];
            table = ftable[itable] + fraction*dftable[itable];
            forcecoul = qtmp*q[j] * table;
            if (factor_coul < 1.0) {
@@ -496,7 +496,7 @@ double PairLJClass2CoulLong::single(int i, int j, int itype, int jtype,
      rsq_lookup.f = rsq;
      itable = rsq_lookup.i & ncoulmask;
      itable >>= ncoulshiftbits;
      fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
      fraction = (rsq - rtable[itable]) * drtable[itable];
      table = ftable[itable] + fraction*dftable[itable];
      forcecoul = atom->q[i]*atom->q[j] * table;
      if (factor_coul < 1.0) {
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ void PairBornCoulLongCS::compute(int eflag, int vflag)
            rsq_lookup.f = rsq;
            itable = rsq_lookup.i & ncoulmask;
            itable >>= ncoulshiftbits;
            fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
            fraction = (rsq - rtable[itable]) * drtable[itable];
            table = ftable[itable] + fraction*dftable[itable];
            forcecoul = qtmp*q[j] * table;
            if (factor_coul < 1.0) {
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ void PairBuckCoulLongCS::compute(int eflag, int vflag)
            rsq_lookup.f = rsq;
            itable = rsq_lookup.i & ncoulmask;
            itable >>= ncoulshiftbits;
            fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
            fraction = (rsq - rtable[itable]) * drtable[itable];
            table = ftable[itable] + fraction*dftable[itable];
            forcecoul = qtmp*q[j] * table;
            if (factor_coul < 1.0) {
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ void PairCoulLongCS::compute(int eflag, int vflag)
          rsq_lookup.f = rsq;
          itable = rsq_lookup.i & ncoulmask;
          itable >>= ncoulshiftbits;
          fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
          fraction = (rsq - rtable[itable]) * drtable[itable];
          table = ftable[itable] + fraction*dftable[itable];
          forcecoul = scale[itype][jtype] * qtmp*q[j] * table;
          if (factor_coul < 1.0) {
+2 −2
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ void PairLJCutCoulLongCS::compute(int eflag, int vflag)
            rsq_lookup.f = rsq;
            itable = rsq_lookup.i & ncoulmask;
            itable >>= ncoulshiftbits;
            fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
            fraction = (rsq - rtable[itable]) * drtable[itable];
            table = ftable[itable] + fraction*dftable[itable];
            forcecoul = qtmp*q[j] * table;
            if (factor_coul < 1.0) {
@@ -481,7 +481,7 @@ void PairLJCutCoulLongCS::compute_outer(int eflag, int vflag)
            rsq_lookup.f = rsq;
            itable = rsq_lookup.i & ncoulmask;
            itable >>= ncoulshiftbits;
            fraction = (rsq_lookup.f - rtable[itable]) * drtable[itable];
            fraction = (rsq - rtable[itable]) * drtable[itable];
            table = ftable[itable] + fraction*dftable[itable];
            forcecoul = qtmp*q[j] * table;
            if (factor_coul < 1.0) {
Loading