wrong dot product in state damper
This commit is contained in:
parent
34f3c15552
commit
066c598203
|
@ -1744,8 +1744,8 @@ subroutine integrateStateFPI()
|
||||||
|
|
||||||
real(pReal) :: dot_prod12, dot_prod22
|
real(pReal) :: dot_prod12, dot_prod22
|
||||||
|
|
||||||
dot_prod12 = dot_product(current - previous, previous - previous2)
|
dot_prod12 = dot_product(current - previous, previous - previous2)
|
||||||
dot_prod22 = dot_product(current - previous2, previous - previous2)
|
dot_prod22 = dot_product(previous - previous2, previous - previous2)
|
||||||
if (dot_prod22 > 0.0_pReal .and. (dot_prod12 < 0.0_pReal .or. dot_product(current,previous) < 0.0_pReal)) then
|
if (dot_prod22 > 0.0_pReal .and. (dot_prod12 < 0.0_pReal .or. dot_product(current,previous) < 0.0_pReal)) then
|
||||||
damper = 0.75_pReal + 0.25_pReal * tanh(2.0_pReal + 4.0_pReal * dot_prod12 / dot_prod22)
|
damper = 0.75_pReal + 0.25_pReal * tanh(2.0_pReal + 4.0_pReal * dot_prod12 / dot_prod22)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue