update write_pre for conditional SL calculation

This commit is contained in:
ignis 2020-02-21 10:28:35 +09:00
parent f61c5d73ff
commit 87283effe6

View file

@ -253,17 +253,28 @@
INTEGER :: i
REAL, DIMENSION(1,nx) :: ux, dux
if ( reaction_type == "onestep" ) then
DO i=1,nx
yr=y1(i,1)
theta=y1(i,2)
ux(1,i)=theta
wrate=rate_1step(yr, theta)
S_L=S_L+wrate*hx
ENDDO
else if ( reaction_type == "twostep" ) then
DO i=1,nx
ya=y1(i,1)
yx=y1(i,2)
theta=y1(i,3)
ux(1,i)=theta
wrate=rate_1step(yr, theta)
wrate1=rate1_2step(ya, yx, theta)
wrate2=rate2_2step(yx, theta)
@ -271,6 +282,11 @@
S_L=S_L+wrate1*hx
ENDDO
else
WRITE(*,*) 'ERROR, UNDEFINED REACTION TYPE ', reaction_type
stop
end if
WRITE(*,'(a31,e14.8)') ' INTEGRAL( Wrate x dx ) => Sc :',S_L
CALL dfnonp(nx,hx,ux(1,:),dux(1,:),1,1)