From da56b9de569ac6546df64872283ae6f2eadde983 Mon Sep 17 00:00:00 2001 From: Joel Clemmer Date: Wed, 7 Apr 2021 07:48:43 -0600 Subject: [PATCH] Adding user-omp support --- src/USER-OMP/pair_gran_hertz_history_omp.cpp | 1 + src/USER-OMP/pair_gran_hooke_history_omp.cpp | 1 + src/USER-OMP/pair_gran_hooke_omp.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/USER-OMP/pair_gran_hertz_history_omp.cpp b/src/USER-OMP/pair_gran_hertz_history_omp.cpp index 2187dcbe90..200075a316 100644 --- a/src/USER-OMP/pair_gran_hertz_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hertz_history_omp.cpp @@ -224,6 +224,7 @@ void PairGranHertzHistoryOMP::eval(int iifrom, int iito, ThrData * const thr) ccel = kn*(radsum-r)*rinv - damp; polyhertz = sqrt((radsum-r)*radi*radj / radsum); ccel *= polyhertz; + if (limit_damping && (ccel < 0.0)) ccel = 0.0; // relative velocities diff --git a/src/USER-OMP/pair_gran_hooke_history_omp.cpp b/src/USER-OMP/pair_gran_hooke_history_omp.cpp index 7894d1e963..0ba9607bd9 100644 --- a/src/USER-OMP/pair_gran_hooke_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_history_omp.cpp @@ -223,6 +223,7 @@ void PairGranHookeHistoryOMP::eval(int iifrom, int iito, ThrData * const thr) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (limit_damping && (ccel < 0.0)) ccel = 0.0; // relative velocities diff --git a/src/USER-OMP/pair_gran_hooke_omp.cpp b/src/USER-OMP/pair_gran_hooke_omp.cpp index 08ae07c6f5..451b074fa9 100644 --- a/src/USER-OMP/pair_gran_hooke_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_omp.cpp @@ -197,6 +197,7 @@ void PairGranHookeOMP::eval(int iifrom, int iito, ThrData * const thr) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; + if (limit_damping && (ccel < 0.0)) ccel = 0.0; // relative velocities