From 4ecaf09bb4faa428c16003af2479787aa5eb36ce Mon Sep 17 00:00:00 2001 From: Paul Reneke Date: Tue, 22 Jun 2021 15:04:46 -0400 Subject: [PATCH] CData: Bug fix in fire decay points --- Source/Cdata/cdata_structures.f90 | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Source/Cdata/cdata_structures.f90 b/Source/Cdata/cdata_structures.f90 index f0b803c91..9c0735813 100644 --- a/Source/Cdata/cdata_structures.f90 +++ b/Source/Cdata/cdata_structures.f90 @@ -1272,24 +1272,15 @@ subroutine fire_do_rand(me, iteration) end if if (me%decay_npts > 0) then t1 = me%firegenerators(2,me%n_firepoints)%realval%val - c = me%firegenerators(1,me%first_decay_pt - 1)%realval%val - b = me%firegenerators(1,me%n_firepoints)%realval%val - c + c = me%firegenerators(1,me%n_firepoints)%realval%val + b = me%firegenerators(1,me%first_decay_pt-1)%realval%val - c + a = b/t1**me%decayexpo deltat = (t1)/(me%decay_npts + 1) - if (me%decayexpo > 1) then - a = b/(t1**me%decayexpo*(1 - me%decayexpo)) - b = -me%decayexpo*a*t1**(me%decayexpo - 1) - else if (me%decayexpo == 1) then - a = b/t1 - b = 0.0_eb - else if (me%decayexpo > 0) then - a = b/t1**me%decayexpo - b = 0.0_eb - end if tmp = 0 do i = me%first_decay_pt, me%n_firepoints - 1 tmp = tmp + 1 me%fire%t_qdot(i) = deltat - me%fire%qdot(i) = a*(tmp*deltat)**me%decayexpo + b*(tmp*deltat) + c + me%fire%qdot(i) = a*(t1 - tmp*deltat)**me%decayexpo + c end do me%fire%t_qdot(me%n_firepoints) = deltat end if