incorporating feedback
This commit is contained in:
@ -119,7 +119,7 @@ as
|
|||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
F^t_{ab} = \frac{15}{3\, \mathrm{Tr}(N)} (T_{ab} - \frac{1}{3} \mathrm{Tr}(T) \delta_{ab})
|
F^t_{ab} = \frac{5}{\mathrm{Tr}(N)} (T_{ab} - \frac{1}{3} \mathrm{Tr}(T) \delta_{ab})
|
||||||
|
|
||||||
where the tensor :math:`T` is defined as
|
where the tensor :math:`T` is defined as
|
||||||
|
|
||||||
|
|||||||
@ -130,8 +130,12 @@ void GranSubModDampingTsuji::init()
|
|||||||
|
|
||||||
double GranSubModDampingTsuji::calculate_forces()
|
double GranSubModDampingTsuji::calculate_forces()
|
||||||
{
|
{
|
||||||
// in case argument < 0 due to precision issues
|
// in case argument <= 0 due to precision issues
|
||||||
double sqrt1 = MAX(0, gm->meff * gm->Fnormal / gm->delta);
|
double sqrt1;
|
||||||
|
if (gm->delta > 0.0)
|
||||||
|
sqrt1 = MAX(0.0, gm->meff * gm->Fnormal / gm->delta);
|
||||||
|
else
|
||||||
|
sqrt1 = 0.0;
|
||||||
damp_prefactor = damp * sqrt(sqrt1);
|
damp_prefactor = damp * sqrt(sqrt1);
|
||||||
return -damp_prefactor * gm->vnnr;
|
return -damp_prefactor * gm->vnnr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user