\hypertarget{accdisk_8f}{}\section{accdisk.\+f File Reference}
\label{accdisk_8f}\index{accdisk.\+f@{accdisk.\+f}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
program \hyperlink{accdisk_8f_a7281365530a2fd21f195fd6c272218c7}{at}
\item 
subroutine \hyperlink{accdisk_8f_a473b1c16022f12251cb3e8402cb8df6e}{rdprm}
\item 
subroutine \hyperlink{accdisk_8f_a7459ce2d7acd8bd48e3ffb39f6da8dfa}{intmdl}
\item 
subroutine \hyperlink{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc}{sadmk} (R, E\+T\+A, D\+L)
\item 
subroutine \hyperlink{accdisk_8f_a8ac2c9ba52dcbd96487877fde4eba585}{sadmk2} (R, E\+T\+A, D\+L, D\+E, V\+X, V\+P, T\+E)
\item 
subroutine \hyperlink{accdisk_8f_acd7a8d59350daf4880565b6bd3604312}{sadmn} (R, E\+T\+A, D\+L)
\item 
subroutine \hyperlink{accdisk_8f_a13067349a76bff208061d738395a4a9c}{sadmn2} (R, E\+T\+A, D\+L, D\+E, V\+X, V\+P, T\+E)
\item 
subroutine \hyperlink{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca}{intgrt} (R, E\+T\+A, D\+L, I\+C)
\item 
subroutine \hyperlink{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}{fun} (X\+I, Y\+I, Y\+P)
\item 
subroutine \hyperlink{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09}{jac} (xi, yi, yp, dfdr, pdj)
\item 
double precision function \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp} (D\+E, P\+R)
\item 
double precision function \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo} (D\+E, P\+R, taup, tau)
\item 
double precision function \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin} (N\+P\+L)
\item 
double precision function \hyperlink{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{fnjn} (N\+P\+L)
\item 
subroutine \hyperlink{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8}{cnvrbs}
\item 
subroutine \hyperlink{accdisk_8f_a07b9d3ba503c4acefbd47999e066c174}{lw1d}
\item 
subroutine \hyperlink{accdisk_8f_af3946263ece485820030e15de29ff8c5}{cfl}
\item 
subroutine \hyperlink{accdisk_8f_a6b5c43f1e7e13e568d53c774ea675e14}{prtrb1}
\item 
subroutine \hyperlink{accdisk_8f_ac41237d948189d5aa4fb266c18a90125}{prtrb2}
\item 
subroutine \hyperlink{accdisk_8f_a56bd1e0e2e7bf956544564f5fdb31ff9}{prtrb3}
\item 
subroutine \hyperlink{accdisk_8f_ae05549904b3a2ceb4d2400464fe3d182}{prtrb4}
\item 
subroutine \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print}
\item 
subroutine \hyperlink{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87}{file}
\item 
subroutine \hyperlink{accdisk_8f_a28db17c574d519f8c766e740324db04f}{rdfl7}
\item 
subroutine \hyperlink{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356}{stifbs} (y, dydx, nv, x, htry, eps, yscal, hdid, hnext,                                                                                           derivs, icon)
\item 
subroutine \hyperlink{accdisk_8f_a3f131e7e7134cac73da29552317c7af0}{simpr} (y, dydx, dfdx, dfdy, nmax, n, xs, htot, nstep, yout,                                                                                       derivs)
\item 
subroutine \hyperlink{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80}{pzextr} (iest, xest, yest, yz, dy, nv)
\item 
subroutine \hyperlink{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56}{ludcmp} (a, n, np, indx, d)
\item 
subroutine \hyperlink{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}{lubksb} (a, n, np, indx, b)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\hypertarget{accdisk_8f_a7281365530a2fd21f195fd6c272218c7}{}\index{accdisk.\+f@{accdisk.\+f}!at@{at}}
\index{at@{at}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{at}]{\setlength{\rightskip}{0pt plus 5cm}program at (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a7281365530a2fd21f195fd6c272218c7}


Definition at line 25 of file accdisk.\+f.



Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{accdisk_8f_a7281365530a2fd21f195fd6c272218c7_cgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_af3946263ece485820030e15de29ff8c5}{}\index{accdisk.\+f@{accdisk.\+f}!cfl@{cfl}}
\index{cfl@{cfl}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{cfl}]{\setlength{\rightskip}{0pt plus 5cm}subroutine cfl (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_af3946263ece485820030e15de29ff8c5}


Definition at line 2406 of file accdisk.\+f.


\begin{DoxyCode}
2406 \textcolor{comment}{C**************************}
2407 \textcolor{comment}{C}
2408       include \textcolor{stringliteral}{'para.h'}
2409 \textcolor{comment}{C}
2410       dimension drp(jmax),drm(jmax),dr(jmax)
2411       dimension dtj(jmax)
2412       dimension u(jmax,4),f(jmax,4),h(jmax,4),y(jmax,4)
2413 \textcolor{comment}{C}
2414 \textcolor{comment}{c      print *,"CFL"}
2415 \textcolor{comment}{C}
2416       gm1 = gm-1
2417       cc2 = cc*cc
2418      
2419       \textcolor{keywordflow}{DO} 5 j=2,jx-1
2420          drp(j) = x1(j+1)-x1(j)
2421          drm(j) = x1(j)-x1(j-1)
2422          dr(j)  = 0.5*(drp(j)+drm(j))
2423  5    \textcolor{keywordflow}{CONTINUE}
2424       drp(1) = x1(2) -x1(1)
2425       drm(jx)= x1(jx)-x1(jx-1)
2426       dr(1)  = drp(1)
2427       dr(jx) = drm(jx)
2428       taueffjx=sqrt(\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(jx)*(\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(jx)+2./sqrt(3.)))
2429      
2430       ji=1
2431       \textcolor{keywordflow}{DO} 10 j=ji,jx
2432          r    = x1(j)
2433          rm1  = r-1
2434          r2   = r*r
2435          r3   = r2*r
2436          ok   = (r/rm1)*sqrt(0.5/r3)
2437          de   = w0(j,1)
2438          vx   = w0(j,2)
2439          vp   = w0(j,3)
2440          te   = w0(j,4)
2441          \textcolor{keywordflow}{if} (j.eq.jx) \textcolor{keywordflow}{then}
2442             pr   = (aa/3.)*(te**4)+rmu*de*te
2443          \textcolor{keywordflow}{else}
2444             \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.1) \textcolor{keywordflow}{then} 
2445                fac  =  1./((1.+1./\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)/(1.5*\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+sqrt(3.))))
2446             \textcolor{keywordflow}{else} 
2447                fac  = 1.0
2448 \textcolor{keywordflow}{            endif}
2449             pr   = (aa/3.)*(te**4)*fac+rmu*de*te
2450 \textcolor{keywordflow}{         endif}
2451          beta = rmu*de*te/pr
2452          hh   = sqrt(b5*pr/de)/ok
2453          ss   = 2*ain*de*hh*rg
2454          ww   = 2*ainp1*pr*hh*rg
2455          wc   = ww/cc2
2456          ws   = wc/ss
2457          a1   = 4.-3.*beta
2458          a2   = beta+12.*gm1*(1.-beta)
2459          gg1  = beta+(a1*a1*gm1)/a2
2460          gg3  = 1.+(gg1-beta)/a1
2461          cs2  = ((3.*gg1-1.)+2.*(gg3-1.)*alpha*alpha)*ws/(gg1+1.)
2462          cs   = sqrt(cs2)
2463          dtj(j) = dr(j)/(cs+abs(vx))
2464          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j).ge.2) dtj(j)=dtmax
2465 \textcolor{comment}{c     }
2466          demn   = ain*de
2467          temn   = 2*te/3.0
2468          xkff   = xkkr*demn*(temn**(-3.5))
2469          tauff  = xkff*de*hh*rg
2470          taues  = xkes*de*hh*rg
2471          tau    = taues+tauff
2472 
2473          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
2474             taueff = sqrt(\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)*(\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+2./sqrt(3.)))
2475          \textcolor{keywordflow}{else} 
2476             taueff = sqrt(3*tau*\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j))
2477 \textcolor{keywordflow}{         end if}
2478      
2479          \textcolor{keywordflow}{if} (taueff.gt.taueffjx) dtj(j)=dtmax
2480  10   \textcolor{keywordflow}{CONTINUE}
2481 
2482       dt = dtmax
2483       \textcolor{keywordflow}{DO} 20 j = ji,jx
2484 \textcolor{comment}{c     DT = MIN(DT,.04*DTJ(J))}
2485          dt = min(dt,cfc*dtj(j))
2486  20   \textcolor{keywordflow}{CONTINUE}
2487 \textcolor{comment}{c     }
2488       dt = max(dt,dtmin)
2489 \textcolor{comment}{c     }
2490       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=197pt]{accdisk_8f_af3946263ece485820030e15de29ff8c5_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=174pt]{accdisk_8f_af3946263ece485820030e15de29ff8c5_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8}{}\index{accdisk.\+f@{accdisk.\+f}!cnvrbs@{cnvrbs}}
\index{cnvrbs@{cnvrbs}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{cnvrbs}]{\setlength{\rightskip}{0pt plus 5cm}subroutine cnvrbs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8}


Definition at line 1495 of file accdisk.\+f.


\begin{DoxyCode}
1495 \textcolor{comment}{C**************************}
1496 \textcolor{comment}{C}
1497 \textcolor{comment}{C -----------------------------------------------------------}
1498 \textcolor{comment}{C     TRANSFORMATION FROM (Y0:ETA,DL) TO (W0:DE,VR,DL,TE)}
1499 \textcolor{comment}{C     SET OUTER BOUNDARY AT ROUT2}
1500 \textcolor{comment}{C -----------------------------------------------------------}
1501 \textcolor{comment}{C}
1502       include \textcolor{stringliteral}{'para.h'}
1503 \textcolor{comment}{C}
1504 \textcolor{comment}{c      write(6,*) "sub-CNVRBS"}
1505       j=0
1506 \textcolor{comment}{C}
1507  200                         \textcolor{keywordflow}{continue}
1508       j  = j+1
1509       jj = jx-j+1
1510       r  = x0(jj)
1511                              \textcolor{keywordflow}{if} (r.le.rin2) \textcolor{keywordflow}{goto} 200
1512 100   \textcolor{keywordflow}{CONTINUE}
1513       j3 = jj
1514       j  = 0
1515 \textcolor{comment}{C}
1516  2000                        \textcolor{keywordflow}{continue}
1517 \textcolor{comment}{C}
1518       j   = j+1
1519       jj  = j3-j+1
1520       r   = x0(jj)
1521       eta = y0(1,jj)
1522       \textcolor{keywordflow}{IF} (eta.LT.0.) \textcolor{keywordflow}{THEN}
1523          kpr=1
1524          \textcolor{keywordflow}{return}
1525 \textcolor{keywordflow}{      ENDIF}
1526       dl  = y0(2,jj)
1527       rm1 = r-1.
1528       r2  = r*r
1529       r3  = r2*r
1530       ok  = (r/rm1)*sqrt(.5/r3)
1531       xlk = r2*ok
1532       xl  = xlk+dl
1533       xll = xl-xlin
1534       xll2= xll*xll
1535       al2 = alpha*alpha
1536       ws  = xll2*eta/(al2*r2)
1537       pd  = (ain/ainp1)*ws
1538       hh  = (sqrt(2.*xnpl1*pd))/ok
1539       pr  = (xmdot*xll/(4.*pi*r2*alpha*ainp1*hh))*cc/(rg*rg)
1540       \textcolor{keywordflow}{if} (pr.le.0.) \textcolor{keywordflow}{then}
1541           kpr=1
1542           \textcolor{keywordflow}{return}
1543 \textcolor{keywordflow}{      endif}
1544       de  = pr/(pd*cc*cc)
1545       tauff  = xkff*de*hh*rg
1546       taues  = xkes*de*hh*rg
1547       tau    = taues+tauff
1548       te = \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}(de,pr)
1549 
1550       qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1551       taup  = qbr/(8.*aa*cc*(te**4))
1552 
1553 \textcolor{comment}{c      write(6,*) r,tau,taup}
1554 \textcolor{comment}{c      pause}
1555 
1556       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1557 \textcolor{comment}{c          te = temp(de,pr)}
1558 \textcolor{comment}{c         if (kcool.eq.0) TE  = TEMP(DE,PR)}
1559          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.1) te  = \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}(de,pr,taup,tau)
1560       \textcolor{keywordflow}{else}
1561          te  = pr/de/rmu
1562 \textcolor{keywordflow}{      endif}
1563       s0  = (4.*aa/(3.*de))*(te**3)+rmu*((1./gm1)*log(te)-log(de))
1564       beta= rmu*de*te/pr
1565       a   = 3*(1-beta)+beta/gm1
1566       ss  = 2*ain*de*hh*rg
1567       ww  = 2*ainp1*hh*pr*rg
1568       wc  = ww/(cc*cc)
1569       ws  = wc/ss
1570       vx  =-xmdot/(2.*pi*r*ss*cc*rg)
1571       vp  = dl/r
1572       ee  = (a+0.5)*ws+0.5*(vx*vx+vp*vp)
1573 \textcolor{comment}{C}
1574       w0(j,1) = de
1575       w0(j,2) = vx
1576       w0(j,3) = vp
1577       w0(j,4) = te
1578       x1(j)   = r
1579       rs      = r*ss
1580       u0(j,1) = rs
1581       u0(j,2) = rs*vx
1582       u0(j,3) = rs*vp
1583       u0(j,4) = rs*ee
1584 \textcolor{comment}{C}
1585       demn   = ain*de
1586       temn   = 2*te/3.0
1587       xkff   = xkkr*demn*(temn**(-3.5))
1588 \textcolor{comment}{c      TAUES  = 2.*XKES*DE*HH*RG}
1589       taues  = xkes*de*hh*rg
1590 \textcolor{comment}{c      TAUFF  = 2.*XKFF*DE*HH*RG}
1591       tauff  = xkff*de*hh*rg
1592       tau    = taues+tauff
1593       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1594       taup   = qbr/(8.*aa*cc*(te**4))
1595       \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)= taup
1596       \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)=tau
1597 \textcolor{comment}{C}
1598  1    \textcolor{keyword}{format} (\textcolor{stringliteral}{"w0="},4e11.3)
1599  2    \textcolor{keyword}{format} (\textcolor{stringliteral}{"x1="},f7.3,\textcolor{stringliteral}{" rs="},e11.3)
1600  3    \textcolor{keyword}{format} (\textcolor{stringliteral}{"u0="},4e11.3)
1601 \textcolor{comment}{C }
1602                             \textcolor{keywordflow}{if} (r.lt.rout2) \textcolor{keywordflow}{goto} 2000
1603 1000  \textcolor{keywordflow}{CONTINUE}
1604 \textcolor{comment}{C}
1605       jx = j
1606       \textcolor{keywordflow}{if} (imore.eq.2) 
1607      &   \textcolor{keyword}{WRITE} (6,*)  \textcolor{stringliteral}{'    ### MESH POINTS = '},jx,\textcolor{stringliteral}{' ###'}
1608 \textcolor{comment}{C}
1609       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=269pt]{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87}{}\index{accdisk.\+f@{accdisk.\+f}!file@{file}}
\index{file@{file}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{file}]{\setlength{\rightskip}{0pt plus 5cm}subroutine file (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87}


Definition at line 2833 of file accdisk.\+f.


\begin{DoxyCode}
2833 \textcolor{comment}{C**************************}
2834 \textcolor{comment}{C}
2835       include \textcolor{stringliteral}{'para.h'}
2836 \textcolor{comment}{C}
2837       \textcolor{keywordflow}{if} (kf.eq.0) \textcolor{keywordflow}{then}
2838          \textcolor{keyword}{write} (8,902) jx
2839          \textcolor{keyword}{write} (8,903)
2840          \textcolor{keywordflow}{do} 10 j=1,jx
2841             \textcolor{keyword}{write} (8,904) j,x1(j)
2842  10      \textcolor{keywordflow}{continue}   
2843          kf=1
2844 \textcolor{keywordflow}{      ENDIF}
2845 \textcolor{comment}{C     }
2846       \textcolor{keywordflow}{IF} ((mod(ns,ksfl).NE.0).AND.(ns.NE.nsx)) \textcolor{keywordflow}{RETURN}
2847 \textcolor{comment}{C     IF ((ns.eq.lns).and.(ns.ne.0)) return}
2848 \textcolor{comment}{C     }
2849 \textcolor{comment}{c     WRITE (2) NS,TIME,DT,((W0(J,K),K=1,4),J=1,JX)}
2850       \textcolor{keyword}{write} (8,*)
2851       \textcolor{keyword}{write} (8,905) ns,time
2852       \textcolor{keyword}{write} (8,906)
2853       \textcolor{keywordflow}{do} 20 j=1,jx
2854          \textcolor{keyword}{write} (8,907) j,(w0(j,k),k=1,4),\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j),\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j),x1(j)
2855 \textcolor{comment}{c     write (8,907) j,(w0(j,k),k=1,4),TAUABSO(J),x1(J)}
2856  20   \textcolor{keywordflow}{continue}
2857       \textcolor{keyword}{write} (8,908) dt
2858       \textcolor{keyword}{write} (8,909) \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}
2859       \textcolor{keyword}{write} (8,901) xlin
2860 \textcolor{comment}{C}
2861       \textcolor{keywordflow}{RETURN}
2862 \textcolor{comment}{c     900  format (80x)}
2863  901  \textcolor{keyword}{format} (\textcolor{stringliteral}{"        XLIN="},f18.14)
2864  902  \textcolor{keyword}{format} (\textcolor{stringliteral}{"  JX="},i4)
2865  903  \textcolor{keyword}{format} (2x,\textcolor{stringliteral}{"J"},10x,\textcolor{stringliteral}{"R"})
2866  904  \textcolor{keyword}{format} (i4,1pe15.7)
2867  905  \textcolor{keyword}{format} (\textcolor{stringliteral}{" NS="},i12,\textcolor{stringliteral}{"   TIME="},f12.3)
2868  906  \textcolor{keyword}{format} (5x,\textcolor{stringliteral}{"J"},11x,\textcolor{stringliteral}{"W0(J,1)"},15x,\textcolor{stringliteral}{"W0(J,2)"},15x,\textcolor{stringliteral}{"W0(J,3)"},15x,
2869      &     \textcolor{stringliteral}{"W0(J,4)"},13x,\textcolor{stringliteral}{"TAUABSO"},15x,\textcolor{stringliteral}{"tau"},15x,\textcolor{stringliteral}{"R"})
2870 \textcolor{comment}{c     907  format (i7,6(1pe22.14),I3)}
2871  907  \textcolor{keyword}{format} (i7,6(1pe22.14),(1pe15.7))
2872  908  \textcolor{keyword}{format} (\textcolor{stringliteral}{" THE NEXT DT="},e11.3)
2873  909  \textcolor{keyword}{format} (\textcolor{stringliteral}{"       XMDOT="},e11.3)
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=197pt]{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=252pt]{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{}\index{accdisk.\+f@{accdisk.\+f}!fnin@{fnin}}
\index{fnin@{fnin}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{fnin(\+N\+P\+L)}]{\setlength{\rightskip}{0pt plus 5cm}double precision function fnin (
\begin{DoxyParamCaption}
\item[{}]{N\+P\+L}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}


Definition at line 1462 of file accdisk.\+f.


\begin{DoxyCode}
1462 \textcolor{comment}{C***************************}
1463 \textcolor{comment}{C}
1464       \textcolor{keywordtype}{IMPLICIT} \textcolor{keywordtype}{REAL*8} (a-h,o-z)
1465       \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin} = 1
1466 \textcolor{comment}{C}
1467       \textcolor{keywordflow}{DO} 10 i=1,npl
1468       odd = 2.*i+1
1469       evn = 2.*i
1470       \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin}= \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin}*evn/odd
1471 10    \textcolor{keywordflow}{CONTINUE}
1472 \textcolor{comment}{C}
1473       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=255pt]{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{}\index{accdisk.\+f@{accdisk.\+f}!fnjn@{fnjn}}
\index{fnjn@{fnjn}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{fnjn(\+N\+P\+L)}]{\setlength{\rightskip}{0pt plus 5cm}double precision function fnjn (
\begin{DoxyParamCaption}
\item[{}]{N\+P\+L}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a0b66793a1932f6312b141b0d46546864}


Definition at line 1478 of file accdisk.\+f.


\begin{DoxyCode}
1478 \textcolor{comment}{C***************************}
1479 \textcolor{comment}{C}
1480       \textcolor{keywordtype}{IMPLICIT} \textcolor{keywordtype}{REAL*8} (a-h,o-z)
1481       \hyperlink{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{fnjn} = 3.1415926/2.0d0
1482 \textcolor{comment}{C}
1483       \textcolor{keywordflow}{DO} 10 i=1,npl+1
1484       odd = 2.*i-1
1485       evn = 2.*i
1486       \hyperlink{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{fnjn}= \hyperlink{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{fnjn}*odd/evn
1487 10    \textcolor{keywordflow}{CONTINUE}
1488 \textcolor{comment}{C}
1489       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=255pt]{accdisk_8f_a0b66793a1932f6312b141b0d46546864_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}{}\index{accdisk.\+f@{accdisk.\+f}!fun@{fun}}
\index{fun@{fun}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{fun(\+X\+I, Y\+I, Y\+P)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine fun (
\begin{DoxyParamCaption}
\item[{}]{X\+I, }
\item[{dimension(2)}]{Y\+I, }
\item[{dimension(2)}]{Y\+P}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}


Definition at line 984 of file accdisk.\+f.


\begin{DoxyCode}
984 \textcolor{comment}{c     input  : XI=r,YI(1)=eta,YI(2)=dl}
985 \textcolor{comment}{c     output : YP(1)=d(eta)/dr, YP(2)=d(l)/dr}
986 \textcolor{comment}{C*******************************************************}
987 \textcolor{comment}{C}
988       include \textcolor{stringliteral}{'para.h'}
989 \textcolor{comment}{C}
990       dimension yi(2),yp(2)
991 \textcolor{comment}{c     }
992       cc2=cc*cc
993 \textcolor{comment}{c     ----- rg/c^2 -----}
994       unit   = rg/cc2
995 \textcolor{comment}{C     }
996       eta   = yi(1)
997 \textcolor{comment}{c     ---- ETA must be > 0 ----}
998       \textcolor{keywordflow}{IF} (eta .LT. 0.) \textcolor{keywordflow}{THEN}
999          kpr=1
1000          \textcolor{keywordflow}{return}
1001 \textcolor{keywordflow}{      ENDIF}
1002 \textcolor{comment}{c     -------------------------}
1003       dl    = yi(2)
1004       r     = xi
1005       r2    = r*r
1006       r3    = r2*r
1007       r4    = r3*r
1008       rm1   = r-1.
1009       al2   = alpha**2
1010       ok    = (r/rm1)*sqrt(.5/r3)
1011       xlk   = r2*ok
1012       dlnok =-.5/r-1./rm1
1013 \textcolor{comment}{c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1014 \textcolor{comment}{c             -d     Ok               dlnLk}
1015 \textcolor{comment}{c     DLNRH = -- ln (---)   ; DLKDR = -----}
1016 \textcolor{comment}{c             dr      r                dr}
1017 \textcolor{comment}{c}
1018 \textcolor{comment}{c     XL    : dL-Lk = L (angular momentum at this radius)     }
1019 \textcolor{comment}{c     XLL   : L-Lin }
1020 \textcolor{comment}{c     XLLK2 : 2*DL*LK+(DL)^2 => (LK+DL)^2 - LK^2 = L^2 - LK^2}
1021 \textcolor{comment}{c     WS    : Height integrated Pressure/Surface Density }
1022 \textcolor{comment}{c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     }
1023       dlnrh = 1./r-dlnok
1024       dlkdr = xlk*(1.5/r-1./rm1)
1025       xl    = dl+xlk
1026       xll   = xl-xlin
1027       xll2  = xll*xll
1028       xll3  = xll2*xll
1029       xll7  = xll**7
1030       eta2  = eta*eta
1031       eta5  = eta**5
1032       xllk2 = 2.*dl*xlk+dl*dl
1033       ws    = xll2*eta/(al2*r2)
1034 
1035 \textcolor{comment}{c     +++++++++++++++++++++++++++++++}
1036 \textcolor{comment}{c     PD    : Pressure(P0)/Density(rho0) ratio at equatorial plane(z=0).}
1037 \textcolor{comment}{c     HH    : Scale height at z=0.}
1038 \textcolor{comment}{c     PR    : P0 (Pressure at z=0)}
1039 \textcolor{comment}{c     DE    : rho (Density at z=0)}
1040 \textcolor{comment}{c     +++++++++++++++++++++++++++++++}
1041       
1042       pd    = (ain/ainp1)*ws
1043       hh    = sqrt(2.*xnpl1*pd)/ok
1044       pr    = (xmdot*xll/(4.*pi*r2*alpha*ainp1*hh))*(cc/(rg*rg))
1045       
1046 \textcolor{comment}{c     +++ For Error Check +++ }
1047       \textcolor{keywordflow}{if} (pr.le.0.) \textcolor{keywordflow}{then}
1048          kpr=1
1049          \textcolor{keywordflow}{return}
1050 \textcolor{keywordflow}{      end if}
1051 \textcolor{comment}{c     +++++++++++++++++++++++}
1052       de    = pr/(pd*cc*cc)
1053 \textcolor{comment}{c     -----------------------------------------------------------------}
1054 \textcolor{comment}{c     If optically thick or r=rout1 ==> TE derived from P = Pgas+Prad  }
1055 \textcolor{comment}{c     If optically thin             ==> TE derived from P = Pgas}
1056 \textcolor{comment}{c     -----------------------------------------------------------------}
1057       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1058          te = \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}(de,pr)
1059 \textcolor{comment}{c     TE = temp2(DE,PR)}
1060       \textcolor{keywordflow}{else}
1061          te = pr/de/rmu
1062 \textcolor{keywordflow}{      endif}
1063       beta  = rmu*de*te/pr
1064       beta4 = beta**4
1065       demn  = ain*de
1066       temn  = 2.*te/3.
1067       xkff  = xkkr*demn*(temn**(-3.5))
1068       xk    = xkes+xkff
1069       xkxe  = xk/xkes
1070       xkxf  = xkff/xk
1071 \textcolor{comment}{c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1072 \textcolor{comment}{c     QBR   : Brems cooling [erg/s/cm^2] (BHAD P248 eq.(8.64))}
1073 \textcolor{comment}{c     taup  : Qbrems/Qradiation(?)}
1074 \textcolor{comment}{c     B10   : 1-beta}
1075 \textcolor{comment}{c     B11   : 4-3*beta}
1076 \textcolor{comment}{c     B12   : beta+12*(gamma-1)*(1-beta)}
1077 \textcolor{comment}{c     !GG1 and GG3 are the specific heats ratio}
1078 \textcolor{comment}{c     GG1   : Gamma1}
1079 \textcolor{comment}{c     GG3   : Gamma3}
1080 \textcolor{comment}{c     }
1081 \textcolor{comment}{c     A1    : 2*Gamma1}
1082 \textcolor{comment}{c     A2    : Gamma1-1}
1083 \textcolor{comment}{c     A3    : Gamma3-1}
1084 \textcolor{comment}{c     A4    : 3*Gamma1-1 }
1085 \textcolor{comment}{c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1086       qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1087       taup  = qbr/(8.*aa*cc*(te**4))
1088       b10   = 1.-beta
1089       b11   = 4.-3.*beta
1090       b12   = beta+12.*gm1*b10
1091       gg1   = beta+(b11*b11)*gm1/b12
1092       gg3   = 1.+(gg1-beta)/b11
1093       a1    = 2.*gg1
1094       a2    = gg1-1.
1095       a3    = gg3-1.
1096       a4    = 3.*gg1-1.
1097 \textcolor{comment}{c     ------------------------------------}
1098 \textcolor{comment}{c     QP    : Q^+ (Energy generation)  }
1099 \textcolor{comment}{c     QM    : Q^- }
1100 \textcolor{comment}{c     FF    : Q^- (Brems cooling)}
1101 \textcolor{comment}{c     C1LL  : (L^2-Lk^2)/R^3 * SIGMA/PI}
1102 \textcolor{comment}{c     ------------------------------------}
1103       qp    = 2.*al2*xl/xll
1104       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1105          qm    = ff1*beta4*xll7*eta5/(xkxe*r4)
1106       \textcolor{keywordflow}{else}
1107          ff    = qbr*rg/cc/cc/cc
1108          qm    = 2.*pi*r2*eta/(xmdot*ws)*ff
1109 \textcolor{keywordflow}{      endif}
1110       c1ll  = xllk2/(r3*ws)
1111 \textcolor{comment}{C     }
1112 \textcolor{comment}{C     ***** MATRIX ELEMENTS *****}
1113 \textcolor{comment}{C}
1114 \textcolor{comment}{c | D11  D12 | = |      1                    (eta+1)/(L-Lin)           |}
1115 \textcolor{comment}{c | D21  D22 | = | (3*Gam3-1)/2 (2*Gam1*eta-(Gam3-1)*alpha**2)/(L-Lin) |}
1116 \textcolor{comment}{c}
1117 \textcolor{comment}{c     | c1 | = (eta+1)/R + DLNRH + Sigma/Pi * (L^2-Lk^2)/R^3}
1118 \textcolor{comment}{c     | c2 | =  eta*(2Gam1/R - (Gam1-1)DLNRH) - (Gam3-1)*(Q^+ - Q^-)/R)}
1119 \textcolor{comment}{c}
1120       d11 = 1.
1121       d12 = (eta+1.)/xll
1122       d21 = a4/2.
1123       d22 = (a1*eta-a3*al2)/xll
1124       c1  = (eta+1.)/r+dlnrh+c1ll
1125       c2  = eta*(a1/r-a2*dlnrh)-a3*(qp-qm)/r
1126       c1d = c1-d12*dlkdr
1127       c2d = c2-d22*dlkdr
1128 \textcolor{comment}{C}
1129 \textcolor{comment}{c++++++++++++++++++++++++++++++++++    }
1130 \textcolor{comment}{c    DD   : D (Matsumoto et al. 1984 eq(3.13))}
1131 \textcolor{comment}{c    XN1D : N\_1 eq(3.14)}
1132 \textcolor{comment}{c    XN2D : N\_2 eq(3.14)}
1133 \textcolor{comment}{c++++++++++++++++++++++++++++++++++}
1134       dd   = d11*d22-d12*d21
1135       xn1d = c1d*d22-c2d*d12
1136       xn2d = d11*c2d-d21*c1d
1137 \textcolor{comment}{C}
1138 \textcolor{comment}{C ***** F1 AND F2 *****}
1139 \textcolor{comment}{C}
1140       yp(1) = xn1d/dd
1141       yp(2) = xn2d/dd
1142       kpr=0
1143 \textcolor{comment}{C}
1144 \textcolor{comment}{C}
1145       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=343pt]{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=328pt]{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca}{}\index{accdisk.\+f@{accdisk.\+f}!intgrt@{intgrt}}
\index{intgrt@{intgrt}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{intgrt(\+R, E\+T\+A, D\+L, I\+C)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine intgrt (
\begin{DoxyParamCaption}
\item[{}]{R, }
\item[{}]{E\+T\+A, }
\item[{}]{D\+L, }
\item[{}]{I\+C}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca}


Definition at line 803 of file accdisk.\+f.


\begin{DoxyCode}
803 \textcolor{comment}{C****************************************}
804 \textcolor{comment}{C}
805 \textcolor{comment}{C ------------------------------------------------------}
806 \textcolor{comment}{C     NUMERICAL INTEGRATION OF STEADY DISK EQUATIONS}
807 \textcolor{comment}{C     BY GEAR'S METHOD}
808 \textcolor{comment}{C ------------------------------------------------------}
809 \textcolor{comment}{C}
810       include \textcolor{stringliteral}{'para.h'}
811 \textcolor{comment}{C}
812       dimension yy(2)
813       dimension f(2),xx(jmax)
814       dimension yscal(2)
815       dimension oldyy(2)
816       \textcolor{keywordtype}{EXTERNAL} \hyperlink{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}{fun},\hyperlink{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09}{jac}
817 \textcolor{comment}{C}
818 \textcolor{comment}{c      print *,"INTGRT"}
819       \textcolor{keywordflow}{IF} ((iprint(1) .NE. 0).and.(imore.eq.2)) \textcolor{keyword}{WRITE} (6,300)
820 \textcolor{comment}{C}
821 \textcolor{comment}{c ----------------------------------------------------------      }
822 \textcolor{comment}{c     htry=hini : first dr for steady solution (t=0)}
823 \textcolor{comment}{c     ya1,ya2   : eta, dl       }
824 \textcolor{comment}{c ----------------------------------------------------------}
825 \textcolor{comment}{c}
826       eps     = 1.e-8
827       x0(1)   = r
828       y0(1,1) = eta
829       y0(2,1) = dl
830       yy(1)   = eta
831       yy(2)   = dl
832       nv=2
833       htry=\hyperlink{para_8h_a898f6fd21d1ac7dcb5bde1fbe8163bde}{hini}
834       ya1=abs(yy(1))
835       ya2=abs(yy(2))
836       \textcolor{keywordflow}{if} (ya1.ge.eps) yscal(1)=ya1
837       \textcolor{keywordflow}{if} (ya1.lt.eps) yscal(1)=eps
838       \textcolor{keywordflow}{if} (ya2.ge.eps) yscal(2)=ya2
839       \textcolor{keywordflow}{if} (ya2.lt.eps) yscal(2)=eps
840 \textcolor{comment}{c      yscal(2)=abserr}
841 \textcolor{comment}{C ---- MESH INTERVAL ----}
842 \textcolor{comment}{c      aldr = (log10(ROUT1)-log10(RIN))/(mesh-50.)}
843       aldr = (log10(rout1)-log10(rin))/mesh
844       xx(1)= rout1
845       xold = rout1
846       jj=2
847 10    \textcolor{keywordflow}{continue}
848 \textcolor{comment}{c ++++ Mesh interval 2 ++++}
849 \textcolor{comment}{c      XX(JJ)=XOLD/(10.**aldr)}
850 \textcolor{comment}{c ---- For r < 1000rg case -----}
851 \textcolor{comment}{c      IF (XOLD.GT.1000.) XX(JJ)=XOLD/(10.**(aldr/3.))}
852       \textcolor{keywordflow}{IF} (xold.GT.1000.) xx(jj)=xold/(10.**(aldr/1.))
853       \textcolor{keywordflow}{IF} (xold.LE.1000.) xx(jj)=xold/(10.**aldr/1.)
854 \textcolor{comment}{c ---- For r < 3.2rg  case -----}
855       dxx = xx(jj-1)-xx(jj)
856 \textcolor{comment}{c      write(6,*) "before",jj,xx(jj),dxx}
857 \textcolor{comment}{c      pause}
858 \textcolor{comment}{c      IF (dxx.LE.0.05) XX(JJ)=XOLD-0.01}
859 \textcolor{comment}{c      IF (dxx.lt.0.5) XX(JJ)=XOLD-0.01}
860 \textcolor{comment}{c      IF (XOLD.LE.3.0) XX(JJ)=XOLD-0.005      }
861       \textcolor{keywordflow}{IF} (dxx.LE.0.3) xx(jj)=xold-0.3*dxx   
862 \textcolor{comment}{cc      IF (XOLD.LE.4.0) xx(jj)=xold-0.3*dxx   }
863 \textcolor{comment}{c      IF (XOLD.LE.3.5) xx(jj)=xold-0.01}
864 \textcolor{comment}{c      IF (dxx.LE.0.1) XX(JJ)=XOLD-0.01}
865       \textcolor{keywordflow}{if} (xold .le. 3.0) xx(jj)=xold-0.01
866 \textcolor{comment}{c      dxx = xx(jj-1)-xx(jj)}
867 
868 \textcolor{comment}{c      if (xx(jj).lt.3.5) then }
869 \textcolor{comment}{c         write(6,*) "after ",jj,xx(jj),dxx}
870 \textcolor{comment}{c         pause}
871 \textcolor{comment}{c      end if}
872 
873 \textcolor{comment}{c +++++++++++++++++++++++++}
874       \textcolor{keywordflow}{IF} (xx(jj).LT.rin) \textcolor{keywordflow}{GOTO} 11
875       xold = xx(jj)
876       jj = jj+1
877       \textcolor{keywordflow}{GOTO} 10
878 11    \textcolor{keywordflow}{CONTINUE}
879 \textcolor{comment}{c ---- Mesh (in real) ----}
880       jjx = jj
881 \textcolor{comment}{C ---- Start Integration at each radius ---- }
882 \textcolor{comment}{c}
883       \textcolor{keywordflow}{do} 2000 j=1,jjx-1
884 \textcolor{comment}{C}
885       r  = x0(j)
886       xend = xx(j+1)
887 \textcolor{comment}{c ---- IOD : ITR count at each grid. ----}
888       iod=0
889 \textcolor{comment}{C}
890  500  \textcolor{keywordflow}{continue}
891 \textcolor{comment}{C      print *,j,xx(j)}
892       iod=iod+1
893 \textcolor{comment}{c 600  continue}
894       oldr=r
895       oldhtry=htry
896       oldyy(1)=yy(1)
897       oldyy(2)=yy(2)
898 \textcolor{comment}{C ----------------------------------------------------------------------}
899       \textcolor{keyword}{call }\hyperlink{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}{fun} (r,yy,f)
900 \textcolor{comment}{c              input  => r, eta, dl == r, yy(1),yy(2)}
901 \textcolor{comment}{c              output => dy dx        == f }
902 \textcolor{comment}{c      for }
903 \textcolor{comment}{C ----------------------------------------------------------------------}
904 \textcolor{comment}{C ---------------------------------------------------------------------}
905       \textcolor{keyword}{call }\hyperlink{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356}{stifbs} (yy,f,nv,r,htry,\hyperlink{para_8h_ab322f8c44aff74e795741b5a2ffb1d4a}{relerr},yscal,hdid,hnext,\hyperlink{accdisk_8f_a0c9ecf94b0fab9b570a0b6e0f9cbc014}{fun},icon)
906 \textcolor{comment}{c     : To solve for stiff problem.     }
907 \textcolor{comment}{C ----------------------------------------------------------------------}
908 \textcolor{comment}{C}
909 \textcolor{comment}{c ----------- CHECK -----------------------------------------------}
910 \textcolor{comment}{c      call fun (r,yy,f)}
911 \textcolor{comment}{c      if (kpr.eq.1) then}
912 \textcolor{comment}{c          r=oldr}
913 \textcolor{comment}{c          htry=oldhtry/2.}
914 \textcolor{comment}{c          yy(1)=oldyy(1)}
915 \textcolor{comment}{c          yy(2)=oldyy(2)}
916 \textcolor{comment}{c          goto 600}
917 \textcolor{comment}{c      endif}
918 \textcolor{comment}{c --------------------------------------------------------------------- }
919       \textcolor{keywordflow}{IF} ((icon .EQ. 10000) .OR. (icon .EQ. 15000)) \textcolor{keywordflow}{THEN}
920          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,100) r,eps
921       \textcolor{keywordflow}{ELSE} \textcolor{keywordflow}{IF} (icon .EQ. 16000) \textcolor{keywordflow}{THEN}
922          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,120)
923          ic = -1
924          \textcolor{keywordflow}{RETURN}
925       \textcolor{keywordflow}{ELSE} \textcolor{keywordflow}{IF} (icon .EQ. 30000) \textcolor{keywordflow}{THEN}
926          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,140)
927          stop
928 \textcolor{keywordflow}{      ENDIF}
929  100  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'TOLERANCE RESET.     R = '},1pe15.7,5x,\textcolor{stringliteral}{'EPSR = '},1pe15
930      *     .7)
931  120  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'NO CONVERGENCE IN CORRECTOR ITERATION'})
932  140  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'INVALID INPUT TO ODGE'})
933       \textcolor{keywordflow}{IF} ((mod(iod,1000).EQ.0).and.(imore.eq.2))
934      &     \textcolor{keyword}{WRITE} (6,*) r,yy(1),yy(2)
935 \textcolor{comment}{C     }
936 \textcolor{comment}{C     -- OBTAIN RSTEP --}
937       \textcolor{keywordflow}{if} (r.eq.xend) \textcolor{keywordflow}{then}           \textcolor{comment}{! xend=xx(j+1)}
938          rstep = r-xx(j+2)
939       \textcolor{keywordflow}{else}
940          rstep = r-xx(j+1)
941 \textcolor{keywordflow}{      endif}
942       htry = -min(abs(hnext),rstep)
943       ya1  = abs(yy(1))
944       ya2  = abs(yy(2))
945       \textcolor{keywordflow}{if} (ya1.ge.eps) yscal(1) = ya1
946       \textcolor{keywordflow}{if} (ya1.lt.eps) yscal(1) = eps
947 \textcolor{comment}{c     yscal(1)=max(abs(yy(1)),1.e-8)}
948 \textcolor{comment}{c     yscal(2)=max(abs(yy(2)),1.e-8)}
949       \textcolor{keywordflow}{if} (ya2.ge.eps) yscal(2) = ya2
950       \textcolor{keywordflow}{if} (ya2.lt.eps) yscal(2) = eps
951 \textcolor{comment}{c     yscal(2)=abserr}
952       \textcolor{keywordflow}{if} (r.gt.xend) \textcolor{keywordflow}{goto} 500
953 \textcolor{comment}{C     }
954       x0(j+1) = r
955       y0(1,j+1) = yy(1)
956       y0(2,j+1) = yy(2)
957 \textcolor{comment}{C     }
958       ip1=iprint(1)
959       \textcolor{keywordflow}{IF} (ip1 .EQ. 0) \textcolor{keywordflow}{GOTO} 1000
960       \textcolor{keywordflow}{IF} (((mod((j+1),ip1) .EQ. 1) .OR. (ip1 .EQ. 1)).and.(imore.eq.2))
961      &     \textcolor{keyword}{WRITE} (6,220) r,yy(1),yy(2),iod
962  220  \textcolor{keyword}{FORMAT} (1h ,3(1pe15.7),i7)
963 \textcolor{comment}{C     }
964  2000 \textcolor{keywordflow}{continue}
965  1000 \textcolor{keywordflow}{CONTINUE}
966 \textcolor{comment}{C     }
967       eta = yy(1)
968       \textcolor{keywordflow}{IF} (eta .GT. 1.) \textcolor{keywordflow}{THEN}
969          ic = 0
970       \textcolor{keywordflow}{ELSE}
971          ic = 1
972 \textcolor{keywordflow}{      ENDIF}
973 \textcolor{comment}{C     }
974 \textcolor{comment}{c     JX = J+1}
975       jx = j
976 \textcolor{comment}{C     }
977  300  \textcolor{keyword}{format} (7x,\textcolor{stringliteral}{"R"},13x,\textcolor{stringliteral}{"ETA"},13x,\textcolor{stringliteral}{"DL"})
978       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=262pt]{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a7459ce2d7acd8bd48e3ffb39f6da8dfa}{}\index{accdisk.\+f@{accdisk.\+f}!intmdl@{intmdl}}
\index{intmdl@{intmdl}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{intmdl}]{\setlength{\rightskip}{0pt plus 5cm}subroutine intmdl (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a7459ce2d7acd8bd48e3ffb39f6da8dfa}


Definition at line 199 of file accdisk.\+f.


\begin{DoxyCode}
199 \textcolor{comment}{C**************************}
200 \textcolor{comment}{C}
201 \textcolor{comment}{C  -------------------------------------------------------------}
202 \textcolor{comment}{C     INITIAL CONDITION}
203 \textcolor{comment}{C     STEADY MODEL OF THIN ACCRETION DISK AROUND A BLACK HOLE}
204 \textcolor{comment}{C     TRANSONIC SOLUTION IS FOUND BY ADJUSTING LIN.}
205 \textcolor{comment}{C  -------------------------------------------------------------}
206 \textcolor{comment}{C}
207       include \textcolor{stringliteral}{'para.h'}
208 \textcolor{comment}{C}
209       il = 0
210 \textcolor{comment}{C}
211 \textcolor{comment}{C -------------------------}
212 \textcolor{comment}{c      DO 100 UNTIL (IC .EQ. 0)}
213  200                         \textcolor{keywordflow}{continue}
214 \textcolor{comment}{C -------------------------}
215 \textcolor{comment}{c}
216 \textcolor{comment}{c ----------------------------------------------------------------------}
217 \textcolor{comment}{c     XLIN  : L\_in, angular momentum at marginally stable orbit.}
218 \textcolor{comment}{c     XLINP : Lower limit of the inner angular momentum}
219 \textcolor{comment}{c     XLINM : Upper limit of the inner angular momentum}
220 \textcolor{comment}{c --------------------------------------------------------------------- }
221 
222       xlin = 0.5*(xlinp+xlinm)
223       r = rout1
224 
225       \textcolor{keywordflow}{if} (kr .eq. 1) \textcolor{keywordflow}{then} 
226          \textcolor{keyword}{CALL }\hyperlink{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc}{sadmk}(r,eta,dl)
227       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (kr .eq. 0) \textcolor{keywordflow}{then} 
228          \textcolor{keyword}{call }\hyperlink{accdisk_8f_acd7a8d59350daf4880565b6bd3604312}{sadmn}(r,eta,dl)
229 \textcolor{keywordflow}{      end if} 
230 \textcolor{comment}{cc                do 2 i=1,2}
231 \textcolor{comment}{cc                if (i.eq.1) r=rout1}
232 \textcolor{comment}{cc                if (i.eq.2) r=rout2}
233 \textcolor{comment}{c                call sadmn(r,eta,dl)}
234 \textcolor{comment}{cc2               continue}
235 \textcolor{comment}{c -------------------------------------------- }
236       \textcolor{keywordflow}{if} (imore.eq.2) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"   IL="},il+1 \textcolor{comment}{! IL -> Iteration count }
237       \textcolor{keyword}{CALL }\hyperlink{accdisk_8f_a1d199fe45ed5ee07bad1edef2f9bffca}{intgrt}(r,eta,dl,ic)
238       \textcolor{keywordflow}{IF} (ic .EQ. 1 ) xlinm = xlin
239       \textcolor{keywordflow}{IF} (ic .EQ. -1) xlinp = xlin
240       il = il+1
241       
242       \textcolor{keywordflow}{IF} (il .GT. 50) \textcolor{keywordflow}{THEN}      \textcolor{comment}{! Set Max Iteration}
243          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,81) il
244          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{write} (6,82) 
245          \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{write} (6,*) \textcolor{stringliteral}{"xlin="}, xlin, \textcolor{stringliteral}{"IC="},ic
246          stop
247 \textcolor{keywordflow}{      ENDIF}
248 \textcolor{comment}{C}
249       \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,80) xlin,r,ic
250  80   \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'LIN = '},1pe22.14,5x,\textcolor{stringliteral}{'R = '},1pe15.7,5x,\textcolor{stringliteral}{'IC = '},i5)
251  81   \textcolor{keyword}{format} (\textcolor{stringliteral}{"LOOP COUNT (INTMDL) IS OVER MAXIMUM  IL="},i3)
252  82   \textcolor{keyword}{format} (\textcolor{stringliteral}{"  IL  IC     LIN"})
253 \textcolor{comment}{C}
254       \textcolor{keywordflow}{if} (ic.ne.0) \textcolor{keywordflow}{goto} 200   
255 100   \textcolor{keywordflow}{CONTINUE}
256 \textcolor{comment}{C}
257       \textcolor{keyword}{CALL }\hyperlink{accdisk_8f_a6e6ad616bfe8e7baa09b5b8b524122a8}{cnvrbs}
258 \textcolor{comment}{C}
259       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a7459ce2d7acd8bd48e3ffb39f6da8dfa_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=188pt]{accdisk_8f_a7459ce2d7acd8bd48e3ffb39f6da8dfa_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09}{}\index{accdisk.\+f@{accdisk.\+f}!jac@{jac}}
\index{jac@{jac}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{jac(xi, yi, yp, dfdr, pdj)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine jac (
\begin{DoxyParamCaption}
\item[{}]{xi, }
\item[{dimension(2)}]{yi, }
\item[{dimension(2)}]{yp, }
\item[{dimension(2)}]{dfdr, }
\item[{dimension(2,2)}]{pdj}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09}


Definition at line 1151 of file accdisk.\+f.


\begin{DoxyCode}
1151 \textcolor{comment}{C**************************************}
1152 \textcolor{comment}{C}
1153       include \textcolor{stringliteral}{'para.h'}
1154 \textcolor{comment}{C}
1155       dimension yi(2),pdj(2,2),dj(2,2,3),cj(2,3),cdj(2,3),dnj(2,3),
1156      &          ddj(3),dfdr(2),yp(2)
1157       cc2=cc*cc
1158       unit   = rg/cc2
1159 \textcolor{comment}{C}
1160       eta   = yi(1)
1161       \textcolor{keywordflow}{IF} (eta.LT.0.) \textcolor{keywordflow}{THEN}
1162       kpr=1
1163       \textcolor{keywordflow}{return}
1164 \textcolor{keywordflow}{      ENDIF}
1165       dl    = yi(2)
1166       r     = xi
1167       r2    = r*r
1168       r3    = r2*r
1169       r4    = r2*r2
1170       r7    = r3*r3*r
1171       r8    = r7*r
1172       rm1   = r-1.
1173       al2   = alpha*alpha
1174 \textcolor{comment}{C}
1175       ok    = (r/rm1)*sqrt(.5/r3)
1176       xlk   = r2*ok
1177       xl    = xlk+dl
1178       xll   = xl-xlin
1179       xll2  = xll*xll
1180       xll3  = xll**3
1181       xll7  = xll**7
1182       eta2  = eta*eta
1183       eta5  = eta**5
1184       xl2   = xl*xl
1185       ws    = xll2*eta/(al2*r2)
1186       pd    = (ain/ainp1)*ws
1187       xlk2  = xlk*xlk
1188       xllk2 = 2.*dl*xlk+dl*dl
1189       dlnok =-0.5/r-1./rm1
1190       dlnrh = 1./r-dlnok
1191       d2lnrh=-1.5/r2-1./(rm1**2)
1192       dlkdr = xlk*(1.5/r-1./rm1)
1193       hh    = sqrt(2.*xnpl1*pd)/ok
1194       pr    = (xmdot*xll/(4.*pi*r2*alpha*ainp1*hh))*(cc/(rg**2))
1195       \textcolor{keywordflow}{if} (pr.le.0.) \textcolor{keywordflow}{then}
1196           kpr=1
1197           \textcolor{keywordflow}{return}
1198 \textcolor{keywordflow}{      endif}
1199       de    = pr/(pd*cc*cc)
1200       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1201          te = \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}(de,pr)
1202       \textcolor{keywordflow}{else}
1203          te = pr/de/rmu
1204 \textcolor{keywordflow}{      endif}
1205       beta  = rmu*de*te/pr
1206       beta4 = beta**4
1207       demn  = ain*de
1208       temn  = 2.*te/3.
1209       xkff  = xkkr*demn*(temn**(-3.5))
1210       xk    = xkes+xkff
1211       xkxe  = xk/xkes
1212       xkxf  = xkff/xk
1213       qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1214       taup  = qbr/(8.*aa*cc*(te**4))
1215       b10   = 1.-beta
1216       b11   = 4.-3.*beta
1217       b12   = beta+12.*gm1*b10
1218       gg1   = beta+(b11**2)*gm1/b12
1219       gg3   = 1.+(gg1-beta)/b11
1220       a1    = 2.*gg1
1221       a2    = gg1-1.
1222       a3    = gg3-1.
1223       a4    = 3.*gg1-1.
1224       qp    = 2.*al2*xl/xll
1225       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1226          qm    = ff1*beta4*xll7*eta5/(xkxe*r4)
1227       \textcolor{keywordflow}{else}
1228          ff    = qbr*rg/cc/cc/cc
1229          qm    = 2.*pi*r2*eta/(xmdot*ws)*ff
1230 \textcolor{keywordflow}{      endif}
1231       c1ll  = xllk2/(r3*ws)
1232 \textcolor{comment}{C}
1233 \textcolor{comment}{C ***** MATRIX ELEMENTS *****}
1234 \textcolor{comment}{C}
1235       d11 = 1.
1236       d12 = (eta+1.)/xll
1237       d21 = a4/2.
1238       d22 = (a1*eta-a3*al2)/xll
1239       c1  = (eta+1.)/r+dlnrh+c1ll
1240       c2  = eta*(a1/r-a2*dlnrh)-a3*(qp-qm)/r
1241       c1d = c1-d12*dlkdr
1242       c2d = c2-d22*dlkdr
1243       dd  = d11*d22-d12*d21
1244       xn1d= c1d*d22-c2d*d12
1245       xn2d= d11*c2d-d21*c1d
1246 \textcolor{comment}{C}
1247 \textcolor{comment}{C ***** CAL. JACOBIAN *****}
1248 \textcolor{comment}{C}
1249       b13   = beta*b10/b11
1250       dbdl  =-b13*(8./xll)
1251       dbde  =-b13*(4.5/eta)
1252       dbdr  = b13*(7./r)
1253       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1254          dg1db = 1.-b11*gm1*(3.*beta+4.+12.*gm1*(2.-3.*beta))/(b12*b12)
1255          dg3db = (dg1db-1.)/b11+3.*(gg1-beta)/(b11*b11)
1256       \textcolor{keywordflow}{else}
1257          dg1db = 0.
1258          dg3db = 0.
1259 \textcolor{keywordflow}{      endif}
1260       dpdl  = 0.
1261       dpde  =-0.5/eta
1262       dpdr  =-1./r
1263       dddl  =-2./xll
1264       ddde  =-1.5/eta
1265       dddr  = 1./r
1266       dwsde = dpde-ddde
1267       dwsdl = dpdl-dddl
1268       dwsdr = dpdr-dddr
1269       dtdl  = (dpdl-beta*dddl)/b11
1270       dtde  = (dpde-beta*ddde)/b11
1271       dtdr  = (dpdr-brta*dddr)/b11
1272       dtdr  =-2./r 
1273       dkdl  = xkxf*(dddl-3.5*dtdl)
1274       dkde  = xkxf*(ddde-3.5*dtde)
1275       dkdr  = xkxf*(dddr-3.5*dtdr) 
1276       \textcolor{keywordflow}{if} ((kr.eq.1).or.(r.eq.rout1)) \textcolor{keywordflow}{then}
1277          dqmde = qm*(4.*dbde/beta+5./eta-dkde)
1278          dqmdl = qm*(4.*dbdl/beta+7./xll-dkdl)
1279          dqmdr = qm*(4.*dbdr/beta-4./r  -dkdr)
1280       \textcolor{keywordflow}{else}
1281          dqmde = qm*(-1./eta)
1282          dqmdl = qm*(-2./xll)
1283          dqmdr = qm*(0.5*(1.-3./r)/rm1)
1284 \textcolor{keywordflow}{      endif}
1285       dqpdl = qp*(1./xl-1./xll)
1286       dqpdr = 0.
1287       d21db = 1.5*dg1db
1288       d22db = (2.*dg1db*eta-dg3db*al2)/xll
1289       dc2db = eta*(2.*dg1db/r-dg1db*dlnrh)-dg3db*(qp-qm)/r
1290 \textcolor{comment}{C}
1291 \textcolor{comment}{C}
1292       dj(1,1,1) = 0.
1293       dj(1,1,2) = 0.
1294       dj(1,1,3) = 0.
1295       dj(1,2,1) = 1./xll
1296       dj(1,2,2) =-d12/xll
1297       dj(1,2,3) = 0.
1298       dj(2,1,1) = d21db*dbde
1299       dj(2,1,2) = d21db*dbdl
1300       dj(2,1,3) = d21db*dbdr
1301       dj(2,2,1) = d22db*dbde+2.*gg1/xll
1302       dj(2,2,2) = d22db*dbdl-d22/xll
1303       dj(2,2,3) = d22db*dbdr
1304 \textcolor{comment}{C}
1305       cj(1,1)   = 1./r-c1ll*dwsde
1306       cj(1,2)   = 2.*xl/(r3*ws)-c1ll*dwsdl
1307       cj(1,3)   =-(eta+2.5)/r2-(3./r)*c1ll-1./(rm1*rm1)
1308       cj(2,1)   = a1/r-a2*dlnrh+a3*dqmde/r+dc2db*dbde
1309       cj(2,2)   =-a3*(dqpdl-dqmdl)/r+dc2db*dbdl
1310       cj(2,3)   =-eta*(a1-1.5*a2)/r2+eta*a2/sqrt(rm1)
1311      &           +a3*(dqmdr*r+qp-qm)/r2+dc2db*dbdr 
1312 \textcolor{comment}{C}
1313       cdj(1,1)  = cj(1,1)-dj(1,2,1)*dlkdr
1314       cdj(1,2)  = cj(1,2)-dj(1,2,2)*dlkdr
1315       cdj(1,3)  = cj(1,3)-dj(1,2,3)*dlkdr
1316      &           -d12*(dlkdr*(1.5/r-1./rm1)+xlk*(-1.5/r2+1./sqrt(rm1)))
1317       cdj(2,1)  = cj(2,1)-dj(2,2,1)*dlkdr
1318       cdj(2,2)  = cj(2,2)-dj(2,2,2)*dlkdr
1319       cdj(2,3)  = cj(2,3)-dj(2,2,3)*dlkdr
1320      &           -d22*(dlkdr*(1.5/r-1./rm1)+xlk*(-1.5/r2+1./sqrt(rm1)))
1321 \textcolor{comment}{C}
1322       dnj(1,1) = cdj(1,1)*d22+c1d*dj(2,2,1)-cdj(2,1)*d12-c2d*dj(1,2,1)
1323       dnj(1,2) = cdj(1,2)*d22+c1d*dj(2,2,2)-cdj(2,2)*d12-c2d*dj(1,2,2)
1324       dnj(1,3) = cdj(1,3)*d22+c1d*dj(2,2,3)-cdj(2,3)*d12-c2d*dj(1,2,3)
1325       dnj(2,1) = dj(1,1,1)*c2d+d11*cdj(2,1)-dj(2,1,1)*c1d-d21*cdj(1,1)
1326       dnj(2,2) = dj(1,1,2)*c2d+d11*cdj(2,2)-dj(2,1,2)*c1d-d21*cdj(1,2)
1327       dnj(2,3) = dj(1,1,3)*c2d+d11*cdj(2,3)-dj(2,1,3)*c1d-d21*cdj(1,3)
1328 \textcolor{comment}{C}
1329       ddj(1)  = dj(1,1,1)*d22+d11*dj(2,2,1)-dj(1,2,1)*d21-d12*dj(2,1,1)
1330       ddj(2)  = dj(1,1,2)*d22+d11*dj(2,2,2)-dj(1,2,2)*d21-d12*dj(2,1,2)
1331       ddj(3)  = dj(1,1,3)*d22+d11*dj(2,2,3)-dj(1,2,3)*d21-d12*dj(2,1,3)
1332 \textcolor{comment}{C}
1333       dfdr(1)   = (dnj(1,3)*dd-xn1d*ddj(3))/(dd*dd)
1334       dfdr(2)   = (dnj(2,3)*dd-xn2d*ddj(3))/(dd*dd)
1335       pdj(1,1)  = (dnj(1,1)*dd-xn1d*ddj(1))/(dd*dd)
1336       pdj(1,2)  = (dnj(1,2)*dd-xn1d*ddj(2))/(dd*dd)
1337       pdj(2,1)  = (dnj(2,1)*dd-xn2d*ddj(1))/(dd*dd)
1338       pdj(2,2)  = (dnj(2,2)*dd-xn2d*ddj(2))/(dd*dd)
1339       kpr=0
1340 \textcolor{comment}{C}
1341       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=342pt]{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}{}\index{accdisk.\+f@{accdisk.\+f}!lubksb@{lubksb}}
\index{lubksb@{lubksb}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{lubksb(a, n, np, indx, b)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine lubksb (
\begin{DoxyParamCaption}
\item[{dimension(np,np)}]{a, }
\item[{integer}]{n, }
\item[{integer}]{np, }
\item[{integer, dimension(n)}]{indx, }
\item[{dimension(n)}]{b}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}


Definition at line 3245 of file accdisk.\+f.


\begin{DoxyCode}
3245       \textcolor{keywordtype}{implicit} \textcolor{keywordtype}{real*8} (a-h,o-z)
3246       \textcolor{keyword}{common} /lscal/ kpr
3247       \textcolor{keywordtype}{integer} n,np,indx(n),kpr
3248 \textcolor{comment}{c      real a(np,np),b(n)}
3249       dimension a(np,np),b(n)
3250       \textcolor{keywordtype}{integer} i,ii,j,ll
3251       ii=0
3252       \textcolor{keywordflow}{do} 12 i=1,n
3253          ll=indx(i)
3254          sum=b(ll)
3255          b(ll)=b(i)
3256          \textcolor{keywordflow}{if} (ii.ne.0) \textcolor{keywordflow}{then}
3257              \textcolor{keywordflow}{do} 11 j=ii,i-1
3258                 sum=sum-a(i,j)*b(j)
3259  11          \textcolor{keywordflow}{continue}
3260          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sum.ne.0.) \textcolor{keywordflow}{then}
3261              ii=i
3262 \textcolor{keywordflow}{         endif}
3263          b(i)=sum
3264  12   \textcolor{keywordflow}{continue}
3265       \textcolor{keywordflow}{do} 14 i=n,1,-1
3266          sum=b(i)
3267          \textcolor{keywordflow}{do} 13 j=i+1,n
3268             sum=sum-a(i,j)*b(j)
3269  13      \textcolor{keywordflow}{continue}
3270          b(i)=sum/a(i,i)
3271  14   \textcolor{keywordflow}{continue}
3272       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a275de2797d71a7dfccc587012ceaafad_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56}{}\index{accdisk.\+f@{accdisk.\+f}!ludcmp@{ludcmp}}
\index{ludcmp@{ludcmp}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{ludcmp(a, n, np, indx, d)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine ludcmp (
\begin{DoxyParamCaption}
\item[{dimension(np,np)}]{a, }
\item[{integer}]{n, }
\item[{integer}]{np, }
\item[{integer, dimension(n)}]{indx, }
\item[{}]{d}
\end{DoxyParamCaption}
)}\label{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56}


Definition at line 3181 of file accdisk.\+f.


\begin{DoxyCode}
3181       \textcolor{keywordtype}{implicit} \textcolor{keywordtype}{real*8} (a-h,o-z)
3182       \textcolor{keyword}{common} /lscal/ kpr
3183       \textcolor{keywordtype}{integer} n,np,indx(n),nmax,kpr
3184 \textcolor{comment}{c      real d,a(np,np),tiny}
3185       dimension a(np,np)
3186       \hyperlink{para_8h_a917ae1b50ccc7039d1bf4d6023818d42}{parameter}(nmax=500,tiny=1.0e-20)
3187       \textcolor{keywordtype}{integer} i,imax,j,k
3188 \textcolor{comment}{c      real aamax,dum,sum,vv(nmax)}
3189       dimension vv(nmax)
3190       d=1.
3191       \textcolor{keywordflow}{do} 12 i=1,n
3192          aamax=0.
3193          \textcolor{keywordflow}{do} 11 j=1,n
3194             \textcolor{keywordflow}{if} (abs(a(i,j)).gt.aamax) aamax=abs(a(i,j))
3195  11      \textcolor{keywordflow}{continue}
3196 \textcolor{comment}{c     if (aamax.eq.0.) pause "singular matrix in ludcmp"}
3197             \textcolor{keywordflow}{if} (aamax.eq.0.) stop \textcolor{stringliteral}{"singular matrix in ludcmp"}
3198          vv(i)=1./aamax
3199  12   \textcolor{keywordflow}{continue}
3200       \textcolor{keywordflow}{do} 19 j=1,n
3201          \textcolor{keywordflow}{do} 14 i=1,j-1
3202             sum=a(i,j)
3203             \textcolor{keywordflow}{do} 13 k=1,i-1
3204                sum=sum-a(i,k)*a(k,j)
3205  13         \textcolor{keywordflow}{continue}
3206             a(i,j)=sum
3207  14      \textcolor{keywordflow}{continue}
3208          aamax=0.
3209          \textcolor{keywordflow}{do} 16 i=j,n
3210             sum=a(i,j)
3211             \textcolor{keywordflow}{do} 15 k=1,j-1
3212                sum=sum-a(i,k)*a(k,j)
3213  15         \textcolor{keywordflow}{continue}
3214             a(i,j)=sum
3215             dum=vv(i)*abs(sum)
3216             \textcolor{keywordflow}{if} (dum.ge.aamax) \textcolor{keywordflow}{then}
3217                 imax=i
3218                 aamax=dum
3219 \textcolor{keywordflow}{            endif}
3220  16      \textcolor{keywordflow}{continue}
3221          \textcolor{keywordflow}{if} (j.ne.imax) \textcolor{keywordflow}{then}
3222              \textcolor{keywordflow}{do} 17 k=1,n
3223                 dum=a(imax,k)
3224                 a(imax,k)=a(j,k)
3225                 a(j,k)=dum
3226  17          \textcolor{keywordflow}{continue}
3227              d=-d
3228              vv(imax)=vv(j)
3229 \textcolor{keywordflow}{         endif}
3230          indx(j)=imax
3231          \textcolor{keywordflow}{if} (a(j,j).eq.0.) a(j,j)=tiny
3232          \textcolor{keywordflow}{if} (j.ne.n) \textcolor{keywordflow}{then}
3233              dum=1./a(j,j)
3234              \textcolor{keywordflow}{do} 18 i=j+1,n
3235                 a(i,j)=a(i,j)*dum
3236  18          \textcolor{keywordflow}{continue}
3237 \textcolor{keywordflow}{         endif}
3238  19   \textcolor{keywordflow}{continue}
3239       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a07b9d3ba503c4acefbd47999e066c174}{}\index{accdisk.\+f@{accdisk.\+f}!lw1d@{lw1d}}
\index{lw1d@{lw1d}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{lw1d}]{\setlength{\rightskip}{0pt plus 5cm}subroutine lw1d (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a07b9d3ba503c4acefbd47999e066c174}


Definition at line 1615 of file accdisk.\+f.


\begin{DoxyCode}
1615 \textcolor{comment}{C**************************}
1616 \textcolor{comment}{C}
1617 \textcolor{comment}{C ----------------------------------------------------------------------}
1618 \textcolor{comment}{C     TIME INTEGRATION OF HYDRODYNAMIC EQUATIONS OF THIN ACCRETION}
1619 \textcolor{comment}{C     DISK BY LAX-WENDROFF METHOD.}
1620 \textcolor{comment}{C ----------------------------------------------------------------------}
1621 \textcolor{comment}{C}
1622       include \textcolor{stringliteral}{'para.h'}
1623 \textcolor{comment}{C}
1624       dimension u(jmax,4),f(jmax,4),h(jmax,4),y(jmax,4),q1(jmax),
1625      *q2(jmax),d(jmax,4)
1626       dimension wk(jmax,4)
1627       dimension drp(jmax),drm(jmax),dr(jmax)
1628       dimension betaj(jmax),tej(jmax)
1629       dimension wt(jmax,4),tauabst(jmax),taut(jmax)
1630 \textcolor{comment}{c      dimension dexise(jmax),uo(jmax)}
1631       dimension okc(jmax),hhc(jmax),prc(jmax),tec(jmax),betac(jmax),
1632      &          ssc(jmax),dec(jmax),betao(jmax)
1633       dimension des(jmax),oes1(jmax),ou(jmax,4)
1634 \textcolor{comment}{C}
1635 \textcolor{comment}{C}
1636       gm1    = gm-1
1637       cc2    = cc*cc
1638       unit   = rg/cc2
1639 \textcolor{comment}{C}
1640       \textcolor{keywordflow}{DO} 5 j=2,jx-1                   
1641          drp(j) = x1(j+1)-x1(j)         \textcolor{comment}{! 前進差分 }
1642          drm(j) = x1(j)-x1(j-1)         \textcolor{comment}{! 後退差分}
1643          dr(j)  = 0.5*(drp(j)+drm(j))   \textcolor{comment}{! drの定義（中心差分）}
1644 5     \textcolor{keywordflow}{CONTINUE}
1645          drp(1) = x1(2) -x1(1)
1646          drm(jx)= x1(jx)-x1(jx-1)
1647          dr(1)  = drp(1)
1648          dr(jx) = drm(jx)
1649 
1650       \textcolor{keywordflow}{do} 152 j=1,jx-1
1651          \hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)=0
1652 152   \textcolor{keywordflow}{continue}
1653 \textcolor{comment}{c}
1654 151   \textcolor{keywordflow}{continue}
1655       xlumi=0.  \textcolor{comment}{! Total luminosity}
1656       \hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn}=0.   \textcolor{comment}{! optically thin luminosity}
1657       xltk=0.   \textcolor{comment}{! optically thick luminosity}
1658 
1659 \textcolor{comment}{c      print *,W0(1,1)}
1660 \textcolor{comment}{c      print *,"L1"}
1661 
1662       \textcolor{keywordflow}{DO} 10 j=1,jx
1663          r    = x1(j)
1664          rm1  = r-1
1665          r2   = r*r
1666          r3   = r2*r
1667          ok   = (r/rm1)*sqrt(0.5/r3)
1668          de   = w0(j,1)
1669          vx   = w0(j,2)
1670          vp   = w0(j,3)
1671          te   = w0(j,4)
1672          wt(j,1) = w0(j,1)
1673          wt(j,2) = w0(j,2)
1674          wt(j,3) = w0(j,3)
1675          wt(j,4) = w0(j,4)
1676          tauabst(j) = \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)
1677          taut(j)    = \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
1678          tau        = \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
1679          taup       = \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)
1680 \textcolor{comment}{c}
1681       \textcolor{keywordflow}{if} (j.eq.jx) \textcolor{keywordflow}{then}
1682          pr   = (aa/3.)*(te**4)+rmu*de*te
1683       \textcolor{keywordflow}{else}
1684          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.1) fac = 1./((1.+1./taup/(1.5*tau+sqrt(3.))))
1685          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.0) fac = 1.
1686 \textcolor{comment}{c}
1687          pr   = (aa/3.)*(te**4)*fac+rmu*de*te
1688 \textcolor{keywordflow}{      endif}
1689 \textcolor{comment}{c}
1690          beta = rmu*de*te/pr
1691          hh   = sqrt(b5*pr/de)/ok
1692          ss   = 2*ain*de*hh*rg
1693          ww   = 2*ainp1*pr*hh*rg
1694          wc   = ww/cc2
1695          ws   = wc/ss
1696          a    = 3*(1-beta)+beta/gm1
1697          ee   = (a+0.5)*ws+0.5*(vx*vx+vp*vp)       \textcolor{comment}{! total energy}
1698          rs   = r*ss
1699          betaj(j)= beta
1700 
1701          u(j,1) = rs                              \textcolor{comment}{! d(r*SS)/dt }
1702          u(j,2) = rs*vx                           \textcolor{comment}{! d(r*SS*vr)/dt }
1703          u(j,3) = rs*vp                           \textcolor{comment}{! d(r*SS*vp)/dt}
1704          u(j,4) = rs*ee                           \textcolor{comment}{! d(r*SS*ee)/dt}
1705 
1706          f(j,1) = rs*vx                         \textcolor{comment}{! d(r*SS*vr)/dr}
1707          f(j,2) = rs*(vx*vx+ws)                 \textcolor{comment}{! d(r*SS*vr^2+r*WW)/dr}
1708          f(j,3) = rs*(vx*vp+alpha*ws)           \textcolor{comment}{! d(r^2*SS*vr*vp-Trp)/dr}
1709          f(j,4) = rs*(vx*(ee+ws)+alpha*ws*vp)  \textcolor{comment}{! d()/dr}
1710 
1711          vk     = r*ok
1712          xlk    = r*vk
1713          dlnor  =-(0.5+r/rm1)
1714          dlnlr  = 2+dlnor
1715          dokdr  = ok*dlnor/r
1716          dlkdr  = xlk*dlnlr/r
1717          demn   = ain*de
1718          temn   = 2*te/3.0
1719          xkff   = xkkr*demn*(temn**(-3.5))
1720          tauff  = xkff*de*hh*rg
1721          taues  = xkes*de*hh*rg
1722          tau    = taues+tauff
1723          qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1724          taup   = qbr/(8.*aa*cc*(te**4))
1725 \textcolor{comment}{c}
1726          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
1727             taueff = sqrt(taup*(tau+2./sqrt(3.)))
1728          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 0) \textcolor{keywordflow}{then} 
1729             taueff = sqrt(3*tau*tauff)
1730 \textcolor{keywordflow}{         end if}
1731 \textcolor{comment}{c}
1732          \textcolor{keywordflow}{if} (ns.eq.lns+1) \textcolor{keywordflow}{then}
1733 \textcolor{comment}{c --------- oes1(j): total energy = E - 0.5*(vr^2*vp^2) }
1734             oes1(j)=u(j,4)/u(j,1)-((u(j,2)/u(j,1))*(u(j,2)/u(j,1))
1735      &           +(u(j,3)/u(j,1))*(u(j,3)/u(j,1)))/2.
1736             ou(j,1)=u(j,1)
1737             ou(j,2)=u(j,2)
1738             ou(j,3)=u(j,3)
1739             ou(j,4)=u(j,4)
1740             \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)=tau
1741             \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)=taup
1742             betao(j)=beta
1743 \textcolor{keywordflow}{         endif}
1744 
1745          xk     = xkes+xkff
1746          fd     = 16*aa*(te**4)/(3*xk*de*hh*cc2)
1747          ff     = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg*rg/cc2/cc
1748 \textcolor{comment}{c--- 2002-04-11 ---}
1749          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq.1) \textcolor{keywordflow}{then} 
1750            fm     = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
1751          \textcolor{keywordflow}{else}
1752            fm     = fd
1753 \textcolor{keywordflow}{         end if}
1754 \textcolor{comment}{c}
1755          h(j,1) = 0
1756          h(j,2) = wc*(1-dlnor)+ss*(2*vp*vk+vp*vp)    \textcolor{comment}{! (11.30)の右辺}
1757          h(j,3) =-ss*(vx*vp+vx*dlkdr+alpha*ws)       
1758          h(j,4) =-r*rs*(vx*vp+alpha*ws)*dokdr-r*fm   \textcolor{comment}{! (11.32)の右辺}
1759          \textcolor{keywordflow}{IF} (ns.EQ.lns+1) \textcolor{keywordflow}{THEN}
1760 \textcolor{comment}{cc             FFTR    = FM/UNIT/XMCRIT/CC*16.}
1761              fftr    = fm/unit/xmcrit/cc
1762              xlumi   = xlumi+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1763           \textcolor{keywordflow}{if} (j.eq.jx) xljx=2.*pi*(r*rg)*(dr(j)*rg)*fftr
1764           \textcolor{keywordflow}{if} (taueff.le.1.) \hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn}=\hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn}+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1765           \textcolor{keywordflow}{if} (taueff.gt.1.) xltk=xltk+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1766 \textcolor{keywordflow}{         ENDIF}
1767          betac(j) = beta
1768          okc(j)   = ok
1769          hhc(j)   = hh
1770          prc(j)   = pr
1771          tec(j)   = te
1772          ssc(j)   = ss
1773          dec(j)   = de
1774 10    \textcolor{keywordflow}{CONTINUE}
1775 \textcolor{comment}{c      IF ((NS.EQ.LNS+1).and.(kcau1+kcau2.eq.0)) }
1776 \textcolor{comment}{c     &    WRITE (9,900) TIME-DT,XLumi,xltn,xltk,dt}
1777 \textcolor{comment}{c      print *,"L1.5"}
1778 
1779 \textcolor{comment}{c###### Thermal Conduction #################################### }
1780 \textcolor{comment}{c    xkei: thermal conductivity => K=alpha*xkappa*C\_s*Sigma*C\_v*H}
1781 \textcolor{comment}{c}
1782       \textcolor{keywordflow}{if} (ktcond.eq.1) \textcolor{keywordflow}{then}
1783 \textcolor{comment}{c         do 12 j=2,jx-1}
1784          \textcolor{keywordflow}{do} 12 j=1,jx-1
1785 \textcolor{comment}{c            ef=3.*xkappa*(8.-7.*betac(j))}
1786 \textcolor{comment}{CCCc            cv=3.*(8.-7.*betac(j))/(8.-3.*betac(j)-3.*betac(j))}
1787             cv=3./2.
1788 \textcolor{comment}{cc          xnu=alpha*okc(j)*(hhc(j)**2.)}
1789 \textcolor{comment}{cc          xkei=xkappa*ssc(j)*cv*xnu}
1790 \textcolor{comment}{c          gm31=gm1*(4.-3.*betac(j))}
1791 \textcolor{comment}{c     &         /(betac(j)+12.*gm1*(1.-betac(j)))}
1792 \textcolor{comment}{c         ef=xkappa*gm31}
1793           ef=\hyperlink{para_8h_ad82ac7e23eb3cb49113ff1efc3893b65}{xkappa}
1794           xkei=alpha*ef*okc(j)*(hhc(j)**3)*prc(j)/tec(j)
1795           cn=cv*xkei*(tec(j+1)-tec(j))/drp(j)
1796      &       *sqrt(2./xnpl1)*ainp1*unit
1797 \textcolor{comment}{c         if (nl(j).ge.1) cn=0.}
1798          f(j,4)=f(j,4)-x1(j)*cn
1799          h(j,4)=h(j,4)-cn
1800 12     \textcolor{keywordflow}{continue}
1801 \textcolor{keywordflow}{      endif}
1802 \textcolor{comment}{C########################################## }
1803 \textcolor{comment}{C}
1804 \textcolor{comment}{c      print *,"LW2"}
1805       \textcolor{keywordflow}{DO} 40 j=1,jx-1
1806          ave1 = 0.5*(u(j+1,1)+u(j,1))
1807          ave2 = 0.5*(u(j+1,2)+u(j,2))
1808          ave3 = 0.5*(u(j+1,3)+u(j,3))
1809          ave4 = 0.5*(u(j+1,4)+u(j,4))
1810          fsa1 = f(j+1,1)-f(j,1)
1811          fsa2 = f(j+1,2)-f(j,2)
1812          fsa3 = f(j+1,3)-f(j,3)
1813          fsa4 = f(j+1,4)-f(j,4)
1814          swa1 = 0.5*(h(j+1,1)+h(j,1))
1815          swa2 = 0.5*(h(j+1,2)+h(j,2))
1816          swa3 = 0.5*(h(j+1,3)+h(j,3))
1817          swa4 = 0.5*(h(j+1,4)+h(j,4))
1818          dtdx = dt/drp(j)
1819          y(j,1) = ave1-0.5*dtdx*fsa1+0.5*dt*swa1
1820          y(j,2) = ave2-0.5*dtdx*fsa2+0.5*dt*swa2
1821          y(j,3) = ave3-0.5*dtdx*fsa3+0.5*dt*swa3
1822          y(j,4) = ave4-0.5*dtdx*fsa4+0.5*dt*swa4
1823          es1(j)=y(j,4)/y(j,1)-((y(j,2)/y(j,1))*(y(j,2)/y(j,1))
1824      &         +(y(j,3)/y(j,1))*(y(j,3)/y(j,1)))/2.
1825 40    \textcolor{keywordflow}{CONTINUE}
1826          dtdx    = dt/dr(1)
1827          fsa1    = f(2,1)-f(1,1)
1828          fsa2    = f(2,2)-f(1,2)
1829          fsa3    = f(2,3)-f(1,3)
1830          fsa4    = f(2,4)-f(1,4)
1831          swa1    = 0.5*(h(1,1)+h(2,1))
1832          swa2    = 0.5*(h(1,2)+h(2,2))
1833          swa3    = 0.5*(h(1,3)+h(2,3))
1834          swa4    = 0.5*(h(1,4)+h(2,4))
1835          wk(1,1) = u(1,1)-dtdx*fsa1+dt*swa1
1836          wk(1,2) = u(1,2)-dtdx*fsa2+dt*swa2
1837          wk(1,3) = u(1,3)-dtdx*fsa3+dt*swa3
1838          wk(1,4) = u(1,4)-dtdx*fsa4+dt*swa4
1839 \textcolor{comment}{C}
1840 \textcolor{comment}{c##### Artificial Viscosity #####}
1841 \textcolor{comment}{c What is kcau1 & kcau2 ? => Ans.: kcau1,2 = 0,or 1}
1842 \textcolor{comment}{c      if kcau1&2 = 0 -> no problem! }
1843 \textcolor{comment}{c      if kcau1&2 = 1 -> problem! -> modify!}
1844 
1845       \textcolor{keywordflow}{if} (kcau1+kcau2.eq.0) \textcolor{keywordflow}{then}
1846          qu1=qu
1847       \textcolor{keywordflow}{else}
1848          qu1=16. 
1849 \textcolor{keywordflow}{      endif}
1850 
1851       \textcolor{keywordflow}{DO} 330 j = 1,jx-1
1852          vxp = w0(j+1,2)
1853          vxm = w0(j,2)
1854 \textcolor{comment}{c        qu1=qu}
1855 \textcolor{comment}{c        if (nl(j).ge.1) qu1=qu*5.}
1856          q2(j)= qu1*abs(vxp-vxm)
1857 330   \textcolor{keywordflow}{CONTINUE}
1858 \textcolor{comment}{c}
1859       \textcolor{keywordflow}{do} 340 j=2,jx-1
1860          dtdx=dt/dr(j)
1861          des(j) = dtdx*(q2(j)*(es1(j+1)-es1(j))
1862      &           -q2(j-1)*(es1(j)-es1(j-1)))
1863 340   \textcolor{keywordflow}{CONTINUE}
1864          dtdx = dt/dr(1)
1865          des(1)=dtdx*q2(1)*(es1(2)-es1(1))
1866 \textcolor{comment}{c}
1867       \textcolor{keywordflow}{DO} 350 j=1,jx-1
1868          es1(j) = es1(j)+des(j)
1869 \textcolor{comment}{c         if (kcau1+kcau2.ne.0) es1(1)=oes1(1)}
1870 \textcolor{comment}{c         if (es1(j).le.0.) es1(j)=oes1(j)}
1871 350   \textcolor{keywordflow}{CONTINUE}
1872 
1873       \textcolor{keywordflow}{do} 360 j=1,jx-1
1874 \textcolor{comment}{c      if ((y(1,1).le.0.).or.(es1(1).le.0.)) then}
1875 \textcolor{comment}{c      if ((y(j,1).le.0.).or.(es1(j).le.0.)) then}
1876       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j).ge.2) \textcolor{keywordflow}{then}
1877          es1(j)=oes1(j)
1878          y(j,1)=ou(j,1)
1879          y(j,2)=ou(j,2)
1880          y(j,3)=ou(j,3)
1881          y(j,4)=ou(j,4)
1882 \textcolor{keywordflow}{      endif}
1883 360   \textcolor{keywordflow}{continue}
1884 \textcolor{comment}{C}
1885       kcau1=0
1886       \textcolor{keywordflow}{do} 553 j=1,jx-1
1887          \textcolor{keywordflow}{if} (y(j,1).le.0.e0) \textcolor{keywordflow}{then}  \textcolor{comment}{! if de < 0, then kcau1=1}
1888             \hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)=\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)+1
1889             kcau1=1
1890             nlmax=max(nlmax,\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j))
1891             \textcolor{keywordflow}{goto} 553
1892 \textcolor{keywordflow}{         endif}
1893 \textcolor{comment}{c         es=y(j,4)/y(j,1)-((y(j,2)/y(j,1))*(y(j,2)/y(j,1))}
1894 \textcolor{comment}{c     &      +(y(j,3)/y(j,1))*(y(j,3)/y(j,1)))/2.}
1895 \textcolor{comment}{c         if (es1(j).le.0.e14) then}
1896          \textcolor{keywordflow}{if} (es1(j).le.0.e0) \textcolor{keywordflow}{then}
1897             \hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)=\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)+1
1898             kcau1=1
1899 \textcolor{comment}{c            print *,"!",ns}
1900             nlmax=max(nlmax,\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j))
1901 \textcolor{keywordflow}{         endif}
1902 553   \textcolor{keywordflow}{continue}
1903 \textcolor{comment}{c------------------------------------------}
1904                        \textcolor{keywordflow}{if} (kcau1.eq.1) \textcolor{keywordflow}{then}
1905 \textcolor{comment}{c                          write(6,*) "kcau1=",kcau1}
1906 \textcolor{comment}{c                          pause}
1907 \textcolor{comment}{c------------------------------------------}
1908       \textcolor{keywordflow}{if} (nlmax.le.10) \textcolor{keywordflow}{then}
1909          \textcolor{keywordflow}{do} 570 j=1,jx-1
1910             w0(j,1) = wt(j,1)
1911             w0(j,2) = wt(j,2)
1912             w0(j,3) = wt(j,3)
1913             w0(j,4) = wt(j,4)
1914             \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)=tauabst(j)
1915             \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)=taut(j)
1916 570      \textcolor{keywordflow}{continue}
1917          time=time-dt
1918          dt=dt*0.1
1919          time=time+dt
1920 \textcolor{comment}{c}
1921 \textcolor{comment}{c         print *,"Check after 570 loop (nlmax < 10)"}
1922 \textcolor{comment}{c         print *,"time=",time,"dt=",dt}
1923 \textcolor{comment}{c         pause}
1924 \textcolor{comment}{c}
1925          kback=1
1926          \textcolor{keywordflow}{goto} 151
1927 \textcolor{keywordflow}{      endif}
1928          \textcolor{keywordflow}{if} (y(j,1).le.0.) \textcolor{keywordflow}{then}
1929             krs(j)=1
1930 \textcolor{keywordflow}{         endif}
1931          \textcolor{keywordflow}{if} (es1(j).le.0.) \textcolor{keywordflow}{then}
1932             \hyperlink{para_8h_a1a8e071db6081e2a66987d7e66f9f2e8}{kes}(j)=1
1933 \textcolor{keywordflow}{         endif}
1934          \textcolor{keyword}{call }\hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print}
1935          stop
1936 \textcolor{comment}{c---------------------------}
1937                         \textcolor{keywordflow}{else}
1938 \textcolor{comment}{c---------------------------}
1939 \textcolor{comment}{c      print *,"L3"}
1940       \textcolor{keywordflow}{DO} 100 j=1,jx-1
1941          r   = 0.5*(x1(j)+x1(j+1))
1942          r2  = r*r
1943          r3  = r2*r
1944          rm1 = r-1
1945          ok  = r/rm1*sqrt(0.5/r3)
1946          rs  = y(j,1)
1947          vx  = y(j,2)/rs
1948          vp  = y(j,3)/rs
1949          ee  = y(j,4)/rs
1950          ss  = rs/r
1951          es  = ee-0.5*(vx*vx+vp*vp)
1952          ec2 = es1(j)*cc2
1953          hhs = sqrt(b5*(ain/ainp1)/ss)/ok
1954          beta= betao(j)
1955          te  = w0(j,4)
1956 
1957 \textcolor{comment}{c ***** start 98 iteration! *****}
1958 \textcolor{comment}{c@@@@@ iss > 10 for converge (best value=10) @@@@@}
1959       \textcolor{keywordflow}{do} 98 iss=1,20
1960 \textcolor{comment}{c      if (j.eq.1) print *,beta,te}
1961          obeta  = beta
1962 \textcolor{comment}{c  }
1963          a      = 3*(1-beta)+beta/gm1
1964          ww     = ec2*ss/(a+0.5)
1965          wc     = ww/cc2
1966          hh     = hhs*sqrt(ww)
1967          de     = ss/(2*ain*hh*rg)
1968          demn   = ain*de
1969          temn   = 2*te/3.0
1970          xkff   = xkkr*demn*(temn**(-3.5))
1971          tauff  = xkff*de*hh*rg
1972 \textcolor{comment}{c         TAUFF  = 2.*XKFF*DE*HH*RG}
1973 \textcolor{comment}{c         TAUES  = 2.*XKES*DE*HH*RG}
1974          taues  = xkes*de*hh*rg
1975          tau    = taues+tauff
1976          qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1977          taup   = qbr/(8.*aa*cc*(te**4))
1978          pr     = ww/(2*ainp1*hh*rg)
1979       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.1) \textcolor{keywordflow}{then} 
1980          te = \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}(de,pr,taup,tau)
1981       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.0) \textcolor{keywordflow}{then} 
1982          te = \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}(de,pr)
1983 \textcolor{keywordflow}{      end if}
1984          beta   = rmu*de*te/pr
1985 
1986 \textcolor{comment}{c***** 2002-7-30 *****}
1987          \textcolor{keywordflow}{if} (abs((beta-obeta)/beta) .lt. 1.e-6) \textcolor{keywordflow}{go to} 730
1988  98   \textcolor{keywordflow}{continue}
1989  730     \textcolor{keywordflow}{continue}
1990 \textcolor{comment}{c ***** end 98 iteration! *****}
1991 \textcolor{comment}{c      taueff = sqrt(taup*(tau+2./sqrt(3.)))}
1992 \textcolor{comment}{c      taueffjx=sqrt(tauabso(jx)*(tauo(jx)+2./sqrt(3.)))}
1993 \textcolor{comment}{c}
1994          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
1995             taueff = sqrt(taup*(tau+2./sqrt(3.)))
1996          \textcolor{keywordflow}{else} 
1997             taueff = sqrt(3*tau*tauff)
1998 \textcolor{keywordflow}{         end if}
1999 \textcolor{comment}{c}
2000       \textcolor{keywordflow}{if} (taueff.gt.1.4618e30) \textcolor{keywordflow}{then}
2001        beta  = betao(j)
2002 \textcolor{comment}{c       tau  = tauo(j)}
2003 \textcolor{comment}{c       taup = tauabso(j)}
2004 \textcolor{comment}{c       te   = wt(j,4)}
2005          rs  = ou(j,1)
2006          vx  = ou(j,2)/rs
2007          vp  = ou(j,3)/rs
2008          ee  = ou(j,4)/rs
2009          ss  = rs/r
2010          ec2 = oes1(j)*cc2
2011          hhs = sqrt(b5*(ain/ainp1)/ss)/ok
2012          a   = 3*(1-beta)+beta/gm1
2013          ww  = ec2*ss/(a+0.5)
2014          wc  = ww/cc2
2015          hh  = hhs*sqrt(ww)
2016          de  = ss/(2*ain*hh*rg)
2017          demn   = ain*de
2018          temn   = 2*te/3.0
2019          xkff   = xkkr*demn*(temn**(-3.5))
2020          tauff  = xkff*de*hh*rg
2021          taues  = xkes*de*hh*rg
2022          tau    = taues+tauff
2023          qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2024          taup   = qbr/(8.*aa*cc*(te**4))
2025          pr     = ww/(2*ainp1*hh*rg)
2026          te     = \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}(de,pr,taup,tau)
2027 \textcolor{keywordflow}{      end if}
2028 
2029       ws     = wc/ss
2030       f(j,1) = rs*vx
2031       f(j,2) = rs*(vx*vx+ws)
2032       f(j,3) = rs*(vx*vp+alpha*ws)
2033       f(j,4) = rs*(vx*(ee+ws)+alpha*ws*vp)
2034       vk     = r*ok
2035       xlk    = r*vk
2036       dlnor  = -(0.5+r/rm1)
2037       dlnlr  = 2+dlnor
2038       dokdr  = ok*dlnor/r
2039       dlkdr  = xlk*dlnlr/r
2040 
2041       xk     = xkes+xkff
2042       fd     = 16*aa*(te**4)/(3*xk*de*hh*cc2)
2043 \textcolor{comment}{c--- 2002-04-11 ---}
2044       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq.1) \textcolor{keywordflow}{then} 
2045         fm     = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
2046       \textcolor{keywordflow}{else}
2047         fm     = fd
2048 \textcolor{keywordflow}{      end if}
2049 
2050       h(j,1) = 0
2051       h(j,2) = wc*(1-dlnor)+ss*(2*vp*vk+vp*vp)
2052       h(j,3) = -ss*(vx*vp+vx*dlkdr+alpha*ws)
2053       h(j,4) = -r*rs*(vx*vp+alpha*ws)*dokdr-r*fm
2054       betaj(j)= beta
2055       betac(j)= beta
2056       okc(j) = ok
2057       hhc(j) = hh
2058       prc(j) = pr
2059       tej(j) = te
2060       tec(j) = te
2061       ssc(j) = ss
2062       dec(j) = de
2063 100   \textcolor{keywordflow}{CONTINUE}
2064 \textcolor{comment}{c ----- End of L3 loop -----}
2065 
2066 \textcolor{comment}{c###### Thermal Conduction #################################### }
2067       \textcolor{keywordflow}{if} (ktcond.eq.1) \textcolor{keywordflow}{then}
2068 \textcolor{comment}{c      do 103 j=2,jx-1}
2069       \textcolor{keywordflow}{do} 103 j=1,jx-1
2070 \textcolor{comment}{c         ef=3.*xkappa*(8.-7.*betac(j))}
2071 \textcolor{comment}{CCCc         cv=3.*(8.-7.*betac(j))/(8.-3.*betac(j)-3.*betac(j))}
2072          cv=3./2.
2073 \textcolor{comment}{cc         xnu=alpha*okc(j)*(hhc(j)**2.)}
2074 \textcolor{comment}{cc         xkei=xkappa*ssc(j)*cv*xnu}
2075 \textcolor{comment}{c         gm31=gm1*(4.-3.*betac(j))}
2076 \textcolor{comment}{c     &        /(betac(j)+12.*gm1*(1.-betac(j)))}
2077 \textcolor{comment}{c         ef = xkappa*gm31}
2078          ef = \hyperlink{para_8h_ad82ac7e23eb3cb49113ff1efc3893b65}{xkappa}
2079          xkei = alpha*ef*okc(j)*(hhc(j)**3)*prc(j)/tec(j)
2080          cn = cv*xkei*(tec(j+1)-tec(j))/drp(j)
2081      &      *sqrt(2./xnpl1)*ainp1*unit
2082 \textcolor{comment}{c         if (nl(j).ge.1) cn=0.}
2083          f(j,4)=f(j,4)-x1(j)*cn
2084          h(j,4)=h(j,4)-cn
2085 103   \textcolor{keywordflow}{continue}
2086 \textcolor{keywordflow}{      end if} 
2087 \textcolor{comment}{c##########################################}
2088 \textcolor{comment}{c---------------------------------- }
2089 \textcolor{keywordflow}{                             end if}
2090 \textcolor{comment}{C----------------------------------}
2091 \textcolor{comment}{c      print *,"L4"}
2092       \textcolor{keywordflow}{DO} 120 j=2,jx-1
2093          dtdx   = dt/dr(j)
2094          fsa1   = f(j,1)-f(j-1,1)
2095          fsa2   = f(j,2)-f(j-1,2)
2096          fsa3   = f(j,3)-f(j-1,3)
2097          fsa4   = f(j,4)-f(j-1,4)
2098          swa1   = 0.5*(h(j,1)+h(j-1,1))
2099          swa2   = 0.5*(h(j,2)+h(j-1,2))
2100          swa3   = 0.5*(h(j,3)+h(j-1,3))
2101          swa4   = 0.5*(h(j,4)+h(j-1,4))
2102          wk(j,1) = u(j,1)-dtdx*fsa1+dt*swa1
2103          wk(j,2) = u(j,2)-dtdx*fsa2+dt*swa2
2104          wk(j,3) = u(j,3)-dtdx*fsa3+dt*swa3
2105          wk(j,4) = u(j,4)-dtdx*fsa4+dt*swa4
2106 \textcolor{comment}{c      endif}
2107 120   \textcolor{keywordflow}{CONTINUE}
2108 \textcolor{comment}{C}
2109 \textcolor{comment}{C****** ARTIFICIAL VISCOSITY *****}
2110 \textcolor{comment}{C}
2111 \textcolor{comment}{c      print *,"L6"}
2112 
2113       \textcolor{keywordflow}{if} (kcau1+kcau2.eq.0) \textcolor{keywordflow}{then}
2114          qb1=qb
2115       \textcolor{keywordflow}{else}
2116          qb1=16.
2117 \textcolor{keywordflow}{      endif}
2118 
2119       \textcolor{keywordflow}{DO} 130 j = 1,jx-1
2120          vxp  = w0(j+1,2)
2121          vxm  = w0(j,2)
2122          q1(j)= qb1*abs(vxp-vxm)
2123 130   \textcolor{keywordflow}{CONTINUE}
2124 \textcolor{comment}{C}
2125       \textcolor{keywordflow}{DO} 140 j=2,jx-1
2126       dtdx   = dt/dr(j)
2127       d(j,1) = dtdx*(q1(j)*(u(j+1,1)-u(j,1))-q1(j-1)*(u(j,1)-u(j-1,1)))
2128       d(j,2) = dtdx*(q1(j)*(u(j+1,2)-u(j,2))-q1(j-1)*(u(j,2)-u(j-1,2)))
2129       d(j,3) = dtdx*(q1(j)*(u(j+1,3)-u(j,3))-q1(j-1)*(u(j,3)-u(j-1,3)))
2130       d(j,4) = dtdx*(q1(j)*(u(j+1,4)-u(j,4))-q1(j-1)*(u(j,4)-u(j-1,4)))
2131 140   \textcolor{keywordflow}{CONTINUE}
2132 \textcolor{comment}{C}
2133       dtdx   = dt/dr(1)
2134       d(1,1) = dtdx*q1(1)*(u(2,1)-u(1,1))
2135       d(1,2) = dtdx*q1(1)*(u(2,2)-u(1,2))
2136       d(1,3) = dtdx*q1(1)*(u(2,3)-u(1,3))
2137       d(1,4) = dtdx*q1(1)*(u(2,4)-u(1,4))
2138 \textcolor{comment}{C}
2139       \textcolor{keywordflow}{DO} 150 j=1,jx-1
2140       u(j,1) = wk(j,1)+d(j,1)
2141       u(j,2) = wk(j,2)+d(j,2)
2142       u(j,3) = wk(j,3)+d(j,3)
2143       u(j,4) = wk(j,4)+d(j,4)
2144       es1(j) = u(j,4)/u(j,1)-((u(j,2)/u(j,1))*(u(j,2)/u(j,1))
2145      &      +(u(j,3)/u(j,1))*(u(j,3)/u(j,1)))/2.
2146 150   \textcolor{keywordflow}{CONTINUE}
2147 
2148       \textcolor{keywordflow}{do} 240 j=2,jx-1
2149          dtdx = dt/dr(j)
2150          des(j) = dtdx*(q2(j)*(es1(j+1)-es1(j))
2151      &           -q2(j-1)*(es1(j)-es1(j-1)))
2152 240   \textcolor{keywordflow}{CONTINUE}
2153       dtdx  = dt/dr(1)
2154       des(1)= dtdx*q2(1)*(es1(2)-es1(1))
2155 
2156       \textcolor{keywordflow}{DO} 250 j=1,jx-1
2157          es1(j) = es1(j)+des(j)
2158 250   \textcolor{keywordflow}{CONTINUE}
2159 
2160       \textcolor{keywordflow}{do} 260 j=1,jx-1
2161       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j).ge.2) \textcolor{keywordflow}{then}
2162          es1(j) = oes1(j)
2163 \textcolor{comment}{c}
2164          u(j,1) = ou(j,1)
2165          u(j,2) = ou(j,2)
2166          u(j,3) = ou(j,3)
2167          u(j,4) = ou(j,4)
2168 \textcolor{keywordflow}{      endif}
2169 260   \textcolor{keywordflow}{continue}
2170 \textcolor{comment}{C}
2171       kcau2=0
2172       \textcolor{keywordflow}{do} 153 j=1,jx-1
2173          \textcolor{keywordflow}{if} (u(j,1).le.0.e14) \textcolor{keywordflow}{then}
2174             \hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)=\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)+1
2175             kcau2=1
2176             nlmax=max(nlmax,\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j))
2177             \textcolor{keywordflow}{goto} 153
2178 \textcolor{keywordflow}{         endif}
2179 \textcolor{comment}{c         es=u(j,4)/u(j,1)-((u(j,2)/u(j,1))*(u(j,2)/u(j,1))}
2180 \textcolor{comment}{c     &      +(u(j,3)/u(j,1))*(u(j,3)/u(j,1)))/2.}
2181 \textcolor{comment}{c         if (es.le.0.e14) then}
2182          \textcolor{keywordflow}{if} (es1(j).le.0.e14) \textcolor{keywordflow}{then}
2183             \hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)=\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j)+1
2184             kcau2=1
2185 \textcolor{comment}{c            print *,"@",ns}
2186             nlmax=max(nlmax,\hyperlink{para_8h_a23c4bff55da754bf75280a588ba5465a}{nl}(j))
2187 \textcolor{keywordflow}{         endif}
2188 153   \textcolor{keywordflow}{continue}
2189 \textcolor{comment}{c------------------------------------------}
2190                        \textcolor{keywordflow}{if} (kcau2.eq.1) \textcolor{keywordflow}{then}
2191 \textcolor{comment}{c                          write(6,*) "kcau2=",kcau2}
2192 \textcolor{comment}{c                          pause}
2193 \textcolor{comment}{c------------------------------------------}
2194       \textcolor{keywordflow}{if} (nlmax.le.10) \textcolor{keywordflow}{then}
2195          \textcolor{keywordflow}{do} 170 j=1,jx-1
2196             w0(j,1) = wt(j,1)
2197             w0(j,2) = wt(j,2)
2198             w0(j,3) = wt(j,3)
2199             w0(j,4) = wt(j,4)
2200             \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)=tauabst(j)
2201             \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)=taut(j)
2202 170      \textcolor{keywordflow}{continue}
2203          time=time-dt
2204          dt=dt*0.1
2205          time=time+dt
2206 \textcolor{comment}{c}
2207 \textcolor{comment}{c         print *,"Check after 170 loop (nlmax>=10)"}
2208 \textcolor{comment}{c         print *,"time=",time,"dt=",dt}
2209 \textcolor{comment}{c         pause}
2210 \textcolor{comment}{c}
2211          kback=1
2212          \textcolor{keywordflow}{goto} 151
2213 \textcolor{keywordflow}{      endif}
2214          \textcolor{keywordflow}{if} (u(j,1).le.0.) \textcolor{keywordflow}{then}
2215             krs(j)=1
2216 \textcolor{keywordflow}{         endif}
2217          \textcolor{keywordflow}{if} (es1(j).le.0.) \textcolor{keywordflow}{then}
2218             \hyperlink{para_8h_a1a8e071db6081e2a66987d7e66f9f2e8}{kes}(j)=1
2219 \textcolor{keywordflow}{         endif}
2220          \textcolor{keyword}{call }\hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print}
2221          stop
2222 \textcolor{comment}{c---------------------------}
2223                         \textcolor{keywordflow}{else}
2224 \textcolor{comment}{c---------------------------}
2225 \textcolor{comment}{C}
2226 \textcolor{comment}{C}
2227 \textcolor{comment}{c      print *,"LW7"}
2228       \textcolor{keywordflow}{DO} 160 j=1,jx-1
2229          r   = x1(j)
2230          r2  = r*r
2231          r3  = r2*r
2232          rm1 = r-1
2233          ok  = r/rm1*sqrt(0.5/r3)
2234          rs  = u(j,1)
2235          vx  = u(j,2)/rs
2236          vp  = u(j,3)/rs
2237          ee  = u(j,4)/rs
2238          ss  = rs/r
2239          es  = ee-0.5*(vx*vx+vp*vp)
2240          ec2=es1(j)*cc2
2241          hhs = sqrt(b5*(ain/ainp1)/ss)/ok
2242          beta=betao(j)
2243          te=tej(j)
2244 
2245 \textcolor{comment}{c ----- start 158 iteration! -----}
2246 \textcolor{comment}{c@@@@@ iss > 10 for converge @@@@@      }
2247       \textcolor{keywordflow}{do} 158 iss=1,10
2248 \textcolor{comment}{c      if (j.eq.1) print *,beta,te}
2249          obeta = beta
2250 \textcolor{comment}{c}
2251          a     = 3*(1-beta)+beta/gm1
2252          ww    = ec2*ss/(a+0.5)
2253          wc    = ww/cc2
2254          hh    = hhs*sqrt(ww)
2255          de    = ss/(2*ain*hh*rg)
2256          demn  = ain*de
2257          temn  = 2*te/3.0
2258          xkff  = xkkr*demn*(temn**(-3.5))
2259 \textcolor{comment}{c         TAUFF = 2.*XKFF*DE*HH*RG}
2260          tauff = xkff*de*hh*rg
2261 \textcolor{comment}{c      if (tauff.le.0.) print *,"",tauff,de,hh}
2262       \textcolor{keywordflow}{if} (tauff.le.0.) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"TAUABS="},tauff,\textcolor{stringliteral}{"LW1D2"}
2263 \textcolor{comment}{c      TAUES  = 2.*XKES*DE*HH*RG}
2264          taues = xkes*de*hh*rg
2265          tau   = taues+tauff
2266          qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2267          taup  = qbr/(8.*aa*cc*(te**4))
2268          pr    = ww/(2*ainp1*hh*rg)
2269       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.1) \textcolor{keywordflow}{then} 
2270          te=\hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}(de,pr,taup,tau)
2271       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}.eq.0) \textcolor{keywordflow}{then} 
2272          te=\hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}(de,pr) 
2273 \textcolor{keywordflow}{      end if}
2274 \textcolor{comment}{cc         te=temp(de,pr)}
2275          beta = rmu*de*te/pr
2276 \textcolor{comment}{c***** 2002-7-30 *****}
2277       \textcolor{keywordflow}{if} (abs((beta-obeta)/beta) .lt. 1.e-6) \textcolor{keywordflow}{go to} 731
2278 158   \textcolor{keywordflow}{continue}
2279  731  \textcolor{keywordflow}{continue}
2280 \textcolor{comment}{c ***** end of 158 iteration !*****}
2281 \textcolor{comment}{c      taueff=sqrt(taup*(tau+2./sqrt(3.)))}
2282 \textcolor{comment}{c      taueffjx=sqrt(tauabso(jx)*(tauo(jx)+2./sqrt(3.)))}
2283 \textcolor{comment}{c}
2284          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
2285             taueff = sqrt(taup*(tau+2./sqrt(3.)))
2286          \textcolor{keywordflow}{else} 
2287             taueff = sqrt(3*tau*tauff)
2288 \textcolor{keywordflow}{         end if}
2289 \textcolor{comment}{c}
2290       \textcolor{keywordflow}{if} (taueff.gt.1.4618e30) \textcolor{keywordflow}{then}
2291          beta=betao(j)
2292 \textcolor{comment}{c         tau=tauo(j)}
2293 \textcolor{comment}{c         taup=tauabso(j)}
2294 \textcolor{comment}{c         te=wt(j,4)}
2295          rs  = ou(j,1)
2296          vx  = ou(j,2)/rs
2297          vp  = ou(j,3)/rs
2298          ee  = ou(j,4)/rs
2299          ss  = rs/r
2300          ec2 = oes1(j)*cc2
2301          a      = 3*(1-beta)+beta/gm1
2302          ww     = ec2*ss/(a+0.5)
2303          wc     = ww/cc2
2304          hh     = hhs*sqrt(ww)
2305          de     = ss/(2*ain*hh*rg)
2306          demn   = ain*de
2307          temn   = 2*te/3.0
2308          xkff   = xkkr*demn*(temn**(-3.5))
2309          tauff  = xkff*de*hh*rg
2310          taues  = xkes*de*hh*rg
2311          tau    = taues+tauff
2312          qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2313          taup   = qbr/(8.*aa*cc*(te**4))
2314          pr     = ww/(2*ainp1*hh*rg)
2315          te     = \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}(de,pr,taup,tau)
2316 \textcolor{keywordflow}{      end if}
2317       ws    = wc/ss
2318 \textcolor{comment}{c}
2319       xk      = xkes+xkff
2320         fd = 16*aa*(te**4)/(3.*xk*de*hh*cc2)
2321 
2322 \textcolor{comment}{c--- 2002-04-11 ---}
2323       \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq.1) \textcolor{keywordflow}{then} 
2324         fm     = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
2325       \textcolor{keywordflow}{else}
2326         fm     = fd
2327 \textcolor{keywordflow}{      end if}
2328 \textcolor{comment}{c}
2329       w0(j,1) = de
2330       w0(j,2) = vx
2331       w0(j,3) = vp
2332       w0(j,4) = te
2333       \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j) = tau
2334       \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j) = taup
2335       betao(j)   = beta
2336 \textcolor{comment}{c      taueff     = sqrt(taup*(tau+2./sqrt(3.)))}
2337 \textcolor{comment}{c}
2338          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
2339             taueff = sqrt(taup*(tau+2./sqrt(3.)))
2340          \textcolor{keywordflow}{else} 
2341             taueff = sqrt(3*tau*tauff)
2342 \textcolor{keywordflow}{         end if}
2343 \textcolor{comment}{c}
2344       oes1(j)    = es1(j)
2345       ou(j,1) = u(j,1)
2346       ou(j,2) = u(j,2)
2347       ou(j,3) = u(j,3)
2348       ou(j,4) = u(j,4)
2349 \textcolor{comment}{cc      FFTR    = FM/UNIT/XMCRIT/CC*16.}
2350       fftr    = fm/unit/xmcrit/cc
2351       xlumi   = xlumi+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2352       \textcolor{keywordflow}{if} (taueff.le.1.) \hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn}=\hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn}+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2353       \textcolor{keywordflow}{if} (taueff.gt.1.) xltk=xltk+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2354 \textcolor{comment}{c}
2355 \textcolor{comment}{c      xmdeff = 2.*pi*r2*alpha*ww/(xl-xlin)/xmcrit*rg/cc}
2356       xmdeff = -2.*pi*r*rg*vx*cc*ss/xmcrit
2357 \textcolor{comment}{C      xmdeff = 2.*pi*r2*alpha*ww/xlk/xmcrit*rg/cc}
2358 \textcolor{comment}{c --- Data for S-shaped curve ---}
2359       \textcolor{keywordflow}{IF} (mod(ns,klc).EQ.0) \textcolor{keywordflow}{then} 
2360          frag1=0
2361       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (frag1 .eq. 1) \textcolor{keywordflow}{then} 
2362             \textcolor{keywordflow}{go to} 160
2363       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (r .ge. 5.) \textcolor{keywordflow}{then} 
2364             frag1=1
2365             \textcolor{keywordflow}{go to} 901
2366 \textcolor{comment}{c}
2367  901  \textcolor{keyword}{WRITE} (10,910) time,r,ss,te,xmdeff
2368  910  \textcolor{keyword}{FORMAT} (1pe10.3,1x,1pe10.3,1x,1pe10.3,1x,1pe10.3,1x,1pe10.3,
2369      &        1x,1pe10.3)
2370 \textcolor{keywordflow}{      end if} 
2371 \textcolor{comment}{c ---}
2372 \textcolor{comment}{c}
2373 160   \textcolor{keywordflow}{CONTINUE}
2374       xlumi = xlumi+xljx
2375       xltk  = xltk+xljx
2376 \textcolor{comment}{C}
2377 \textcolor{comment}{c##### Data for yy.lc (Light Curve) ##### }
2378 \textcolor{comment}{c     time : Time }
2379 \textcolor{comment}{c     xlumi: Total Disk luminosity }
2380 \textcolor{comment}{c     xltn : Disk luminosity for [tau < 1] }
2381 \textcolor{comment}{c     xttk : Disk luminosity for [tau > 1]}
2382 \textcolor{comment}{c     dt   : Delta t at that time}
2383 \textcolor{comment}{c     NS   : Time step}
2384 \textcolor{comment}{c     KLC  : Light curve => file9 every KLC time steps!}
2385 \textcolor{comment}{c########################################}
2386 \textcolor{comment}{c}
2387       \textcolor{keywordflow}{if} (imore .eq. 2) \textcolor{keywordflow}{then} 
2388          \textcolor{keywordflow}{if} (mod(ns,200) .eq. 0) \textcolor{keywordflow}{then} 
2389             \textcolor{keyword}{write}(6,88) \textcolor{stringliteral}{"ns="},ns,\textcolor{stringliteral}{" t="},time,\textcolor{stringliteral}{" dt="},dt, \textcolor{stringliteral}{" L="},xlumi
2390  88         \textcolor{keyword}{format} (a3,i12,2x,a3,1pe9.3,2x,a3,1pe9.3,2x,a3,1pe9.3)
2391 \textcolor{keywordflow}{         end if}
2392 \textcolor{keywordflow}{      end if}
2393 \textcolor{comment}{c}
2394       \textcolor{keywordflow}{IF} (mod(ns,klc).EQ.0) \textcolor{keyword}{WRITE} (9,900) time,xlumi,\hyperlink{para_8h_aca2ebd2132688fbe893628e94d3b71d1}{xltn},xltk,dt,ns
2395       \textcolor{keywordflow}{RETURN}
2396 \textcolor{comment}{c-----------------------}
2397 \textcolor{keywordflow}{                   endif}
2398 \textcolor{comment}{c-----------------------}
2399 \textcolor{comment}{cc900   FORMAT (1PE16.8,1X,1PE15.7,1X,1PE15.7,1X,1PE15.7,1x,1pe15.7)}
2400 900   \textcolor{keyword}{FORMAT} (1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,i9)
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a07b9d3ba503c4acefbd47999e066c174_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=182pt]{accdisk_8f_a07b9d3ba503c4acefbd47999e066c174_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{}\index{accdisk.\+f@{accdisk.\+f}!ondo@{ondo}}
\index{ondo@{ondo}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{ondo(\+D\+E, P\+R, taup, tau)}]{\setlength{\rightskip}{0pt plus 5cm}double precision function ondo (
\begin{DoxyParamCaption}
\item[{}]{D\+E, }
\item[{}]{P\+R, }
\item[{}]{taup, }
\item[{}]{tau}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}


Definition at line 1420 of file accdisk.\+f.


\begin{DoxyCode}
1420 \textcolor{comment}{C******************************}
1421 \textcolor{comment}{C}
1422       include \textcolor{stringliteral}{'para.h'}
1423 \textcolor{comment}{C}
1424       a1  = 3.*rmu*de/aa*(1.+1./taup/(1.5*tau+sqrt(3.)))
1425       a2  =-3.*pr/aa*(1.+1./taup/(1.5*tau+sqrt(3.)))
1426       eps = 1.0e-12
1427       tmax= (-a2)**0.25
1428       tmin= 0.
1429       fx  = tmax**4+a1*tmax+a2
1430       fn  = tmin**4+a1*tmin+a2
1431       \textcolor{keywordflow}{DO} 40 itr=1,10
1432          th = 0.5*(tmax+tmin)
1433          fh = th**4+a1*th+a2
1434          \textcolor{keywordflow}{IF} (fh*fn .LT. 0.) tmax=th
1435          \textcolor{keywordflow}{IF} (fh*fn .LT. 0.) fx=fh
1436          \textcolor{keywordflow}{IF} (fh*fx .LT. 0.) tmin=th
1437          \textcolor{keywordflow}{IF} (fh*fx .LT. 0.) fn=fh
1438  40   \textcolor{keywordflow}{CONTINUE}
1439 \textcolor{comment}{C}
1440       xxx = th
1441 \textcolor{comment}{C}
1442       \textcolor{keywordflow}{DO} 100 itr=1,20
1443          xx1 = xxx-(xxx**4+a1*xxx+a2)/(4.*xxx**3+a1)
1444          \textcolor{keywordflow}{IF} (abs((xx1-xxx)/xx1) .LT. eps) \textcolor{keywordflow}{GO TO} 120
1445          xxx = xx1
1446  100  \textcolor{keywordflow}{CONTINUE}
1447 \textcolor{comment}{C}
1448       \textcolor{keyword}{WRITE} (6,110)
1449       \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,de,pr,tmax,tmin,fx,fn,th,fh,xxx,xx1
1450  110  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'LOOP COUNT (TEMP) IS OVER MAXIMUM'})
1451       stop
1452 \textcolor{comment}{C}
1453  120  \textcolor{keywordflow}{CONTINUE}
1454 \textcolor{comment}{C}
1455       \hyperlink{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2}{ondo}=xx1
1456 \textcolor{comment}{C}
1457       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=343pt]{accdisk_8f_a9dac878001fdbccc3304984d1858a5c2_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{}\index{accdisk.\+f@{accdisk.\+f}!print@{print}}
\index{print@{print}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{print}]{\setlength{\rightskip}{0pt plus 5cm}subroutine print (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}


Definition at line 2615 of file accdisk.\+f.


\begin{DoxyCode}
2615 \textcolor{comment}{C**************************}
2616 \textcolor{comment}{C}
2617       include \textcolor{stringliteral}{'para.h'}
2618 \textcolor{comment}{C     }
2619       dimension drp(jmax),drm(jmax),dr(jmax)
2620 \textcolor{comment}{C     }
2621       \textcolor{keywordflow}{if} ((krs(j).eq.1).or.(\hyperlink{para_8h_a1a8e071db6081e2a66987d7e66f9f2e8}{kes}(j).eq.1)) \textcolor{keywordflow}{goto} 100
2622       \textcolor{keywordflow}{IF} (mod(ns,iprint(4)).NE.0) \textcolor{keywordflow}{RETURN}
2623       js = iprint(2)
2624       \textcolor{keywordflow}{IF} (iprint(3).NE.0) \textcolor{keywordflow}{THEN}
2625          \textcolor{keywordflow}{IF} (mod(ns,iprint(3)).EQ.0) js = 1
2626 \textcolor{keywordflow}{      END IF}
2627  100  \textcolor{keywordflow}{continue}
2628 \textcolor{comment}{C     }
2629 \textcolor{comment}{c      print *,"PRINT"}
2630       gm1 = gm-1
2631       cc2 = cc*cc
2632 \textcolor{comment}{C     }
2633       \textcolor{keywordflow}{DO} 5 j=2,jx-1
2634          drp(j) = x1(j+1)-x1(j)
2635          drm(j) = x1(j)-x1(j-1)
2636          dr(j)  = 0.5*(drp(j)+drm(j))
2637  5    \textcolor{keywordflow}{CONTINUE}
2638       drp(1) = x1(2) -x1(1)
2639       drm(jx)= x1(jx)-x1(jx-1)
2640       dr(1)  = drp(1)
2641       dr(jx) = drm(jx)
2642       
2643       \textcolor{keyword}{WRITE}(6,*)
2644       \textcolor{keyword}{WRITE} (6,1000) ns,time,dt,nlmax
2645 
2646       \textcolor{keywordflow}{IF} (imore.EQ.1) \textcolor{keywordflow}{THEN}
2647          \textcolor{keyword}{WRITE} (6,1002)
2648       \textcolor{keywordflow}{ELSE} \textcolor{keywordflow}{IF} (imore.EQ.2) \textcolor{keywordflow}{THEN}
2649          \textcolor{keyword}{WRITE} (6,1004)
2650       \textcolor{keywordflow}{ELSE}
2651          \textcolor{keyword}{WRITE} (6,1005)
2652 \textcolor{keywordflow}{      ENDIF}
2653 
2654       \textcolor{keywordflow}{DO} 10 j=1,jx,js
2655          r    = x1(j)
2656          rm1  = r-1
2657          r2   = r*r
2658          r3   = r2*r
2659          ok   = (r/rm1)*sqrt(0.5/r3)
2660          de   = w0(j,1)
2661          vx   = w0(j,2)
2662          vp   = w0(j,3)
2663          te   = w0(j,4)
2664          \textcolor{keywordflow}{if} (\hyperlink{para_8h_afe8fad7a0aca24881ee34a8cb492e8f9}{ki}.eq.1) \textcolor{keywordflow}{then}
2665             \textcolor{keywordflow}{if} (j.eq.jx) \textcolor{keywordflow}{then}
2666                pr   = (aa/3.)*(te**4)+rmu*de*te
2667             \textcolor{keywordflow}{else}            
2668                \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq.1) \textcolor{keywordflow}{then} 
2669                   fac =  1./((1.+1./\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)/(1.5*\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+sqrt(3.))))
2670                \textcolor{keywordflow}{else} 
2671                   fac = 1. 
2672 \textcolor{keywordflow}{               end if}
2673                pr   = (aa/3.)*(te**4)*fac+rmu*de*te
2674 \textcolor{keywordflow}{            endif}
2675          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (kr.eq.1) \textcolor{keywordflow}{then}
2676             pr   = (aa/3.)*(te**4)+rmu*de*te
2677          \textcolor{keywordflow}{else}
2678             \textcolor{keywordflow}{if} (j.eq.jx) \textcolor{keywordflow}{then}
2679                pr   = (aa/3.)*(te**4)+rmu*de*te
2680             \textcolor{keywordflow}{else}
2681                pr   = rmu*de*te
2682 \textcolor{keywordflow}{            endif}
2683 \textcolor{keywordflow}{         endif}
2684 \textcolor{comment}{c--------------------------------------------------------}
2685 \textcolor{comment}{c     BETA : (gas pressure)/(total pressure)}
2686 \textcolor{comment}{c     HH   : Disk Half Thickness }
2687 \textcolor{comment}{c     SS   : Surface Density }
2688 \textcolor{comment}{c     WW   : Height Integrated Pressure}
2689 \textcolor{comment}{c     WC   : WW/c^2 }
2690 \textcolor{comment}{c     WS   : WC/SS }
2691 \textcolor{comment}{c     }
2692          beta = rmu*de*te/pr
2693          hh   = sqrt(b5*pr/de)/ok
2694          ss   = 2*ain*de*hh*rg
2695          ww   = 2*ainp1*pr*hh*rg
2696          wc   = ww/cc2
2697          ws   = wc/ss
2698 \textcolor{comment}{c------------------------------------------ }
2699       a1   = 4.-3.*beta
2700       a2   = beta+12.*gm1*(1.-beta)
2701       gg1  = beta+(a1*a1*gm1)/a2
2702       gg3  = 1.+(gg1-beta)/a1
2703 
2704       cs2  = ((3.*gg1-1.)+2.*(gg3-1.)*alpha*alpha)*ws/(gg1+1.)
2705       cs   = sqrt(cs2)
2706       cfln = dt/dr(j)*(cs+abs(vx))
2707       vk   = ok*r
2708       xlk  = ok*r2
2709       xl   = r*(vp+vk)
2710 \textcolor{comment}{c      xmdeff = 2.*pi*r2*alpha*ww/(xl-xlin)/xmcrit*rg/cc}
2711 \textcolor{comment}{c      xmdeff = 2.*pi*r2*alpha*ww/xlk/xmcrit*rg/cc}
2712       xmdeff = -2.*pi*r*rg*vx*cc*ss/xmcrit
2713       \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}    = -2.*pi*r*ss*vx*rg*cc/xmcrit
2714 \textcolor{comment}{c}
2715       demn   = ain*de
2716       temn   = 2*te/3.0
2717       xkff   = xkkr*demn*(temn**(-3.5))
2718       tauff  = xkff*de*hh*rg
2719       taues  = xkes*de*hh*rg
2720       tau    = taues+tauff
2721 
2722       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2723       taup   = qbr/(8.*aa*cc*(te**4))
2724 \textcolor{comment}{c}
2725       taueff = sqrt(\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)*(\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+2./sqrt(3.)))
2726 \textcolor{comment}{c}
2727          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool} .eq. 1) \textcolor{keywordflow}{then} 
2728             taueff = sqrt(\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)*(\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+2./sqrt(3.)))
2729          \textcolor{keywordflow}{else} 
2730             taueff = sqrt(3*tau*tauff)
2731 \textcolor{keywordflow}{         end if}
2732 \textcolor{comment}{c}
2733       t1 = \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+2./sqrt(3.)
2734       t2 = 1./\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j)
2735 \textcolor{comment}{c      if (t1.ge.t2) then}
2736 \textcolor{comment}{c         taueff=1.}
2737 \textcolor{comment}{c      else}
2738 \textcolor{comment}{c         taueff=2.}
2739 \textcolor{comment}{c      endif }
2740       a    = 3*(1-beta)+beta/gm1
2741       ee   = (a+0.5)*ws+0.5*(vx*vx+vp*vp)
2742 \textcolor{comment}{c      FMC  = 8.*AA*CC*(TE**4.)/(3.0*tauo(j))}
2743       fmc   = 8.*aa*cc*(te**4)/(1.5*\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)+sqrt(3.)+1./taup)
2744 
2745       teff = (4.*fmc/aa/cc)**0.25 
2746       vphi = vp+vk
2747 
2748       xll = xlk-xlin
2749       qp    = 2.*alpha*alpha*xl/xll
2750 \textcolor{comment}{c      if ((kr.eq.1).or.(r.eq.rout1)) then}
2751 \textcolor{comment}{c         QM    = FF1*BETA4*XLL7*ETA5/(XKXE*R4)}
2752 \textcolor{comment}{c      else}
2753       eta   = vx*vx/(b2*pr/de)
2754       ff    = qbr*rg/cc/cc/cc
2755       qm    = 2.*pi*r*r*eta/(xmdot*ws)*ff
2756 \textcolor{comment}{c      endif}
2757       qadv  = qp-qm
2758       fene  = qadv/qp
2759 \textcolor{comment}{c      write(6,*) "check!",j,r,qp,qm,fene,b2,xmdot,ws}
2760 \textcolor{comment}{c      pause}
2761 \textcolor{comment}{c}
2762 \textcolor{comment}{c     ----- For print routine -----   }
2763       \textcolor{keywordflow}{IF} (imore.EQ.1) \textcolor{keywordflow}{THEN}
2764          \textcolor{keyword}{WRITE}(6,1010) j,r,dr(j),de,vx,vp,te,cs,cfln,ww,ss,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd},hh,es1(j)
2765      *        ,ws,beta,\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
2766       \textcolor{keywordflow}{ELSE} \textcolor{keywordflow}{IF} (imore.EQ.2) \textcolor{keywordflow}{THEN}
2767          \textcolor{keywordflow}{IF} (ns.EQ.lns) \textcolor{keywordflow}{THEN}
2768             \textcolor{keyword}{WRITE}(6,1010) j,r,beta,taueff,te,ss,xmdeff,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd},t1,1/t2
2769          \textcolor{keywordflow}{ELSE}
2770             \textcolor{keyword}{WRITE}(6,1010) j,r,beta,taueff,te,ss,xmdeff,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd},t1,1/t2
2771 \textcolor{keywordflow}{         ENDIF}
2772       \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (imore .eq. 3) \textcolor{keywordflow}{then} 
2773          \textcolor{keyword}{write}(6,1010) j,r,dr(j),de,te,teff,ss,vx,vp,cs,hh,\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
2774      *        ,taueff,ww,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}      
2775       \textcolor{keywordflow}{ELSE} \textcolor{keywordflow}{if} (imore .eq. 0) \textcolor{keywordflow}{then} 
2776          \textcolor{keywordflow}{IF} (ns.EQ.lns) \textcolor{keywordflow}{THEN}
2777             \textcolor{keyword}{WRITE}(6,1010) j,r,beta,teff,te,ss,-vx,vphi,cs,hh,\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j) 
2778      *           ,taueff,ww,fene,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}
2779          \textcolor{keywordflow}{ELSE}
2780             \textcolor{keyword}{WRITE}(6,1010) j,r,beta,teff,te,ss,-vx,vphi,cs,hh,\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
2781      *           ,taueff,ww,fene,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}
2782 \textcolor{keywordflow}{         ENDIF}
2783 \textcolor{keywordflow}{      ENDIF}
2784 
2785  10   \textcolor{keywordflow}{CONTINUE}
2786       \textcolor{keywordflow}{do} 20 j=1,jx-1
2787          \textcolor{keywordflow}{if} (krs(j).ne.0) \textcolor{keywordflow}{then}
2788             \textcolor{keyword}{write} (6,1030) j,ns+1,time
2789         krs(j)=0
2790 \textcolor{keywordflow}{         end if}
2791  20   \textcolor{keywordflow}{continue}
2792       \textcolor{keywordflow}{do} 21 j=1,jx-1
2793          \textcolor{keywordflow}{if} (\hyperlink{para_8h_a1a8e071db6081e2a66987d7e66f9f2e8}{kes}(j).ne.0) \textcolor{keywordflow}{then}
2794             \textcolor{keyword}{write} (6,1031) j,ns+1,time
2795             \hyperlink{para_8h_a1a8e071db6081e2a66987d7e66f9f2e8}{kes}(j)=0
2796 \textcolor{keywordflow}{         end if}
2797 21    \textcolor{keywordflow}{continue}
2798 
2799       nlmax =0
2800 \textcolor{comment}{C}
2801       \textcolor{keywordflow}{RETURN}
2802 \textcolor{comment}{C}
2803  1000 \textcolor{keyword}{FORMAT} (\textcolor{stringliteral}{'NS='},i12,4x,\textcolor{stringliteral}{'TIME='},f12.3,4x,\textcolor{stringliteral}{'DT='},e10.3,4x,
2804      &     \textcolor{stringliteral}{"NLMAX="},i5//)
2805  1002 \textcolor{keyword}{format} (4x,\textcolor{stringliteral}{"J"},5x,\textcolor{stringliteral}{"R"},11x,\textcolor{stringliteral}{"DR"},10x,\textcolor{stringliteral}{"DE"},10x,\textcolor{stringliteral}{"VX"},
2806      &     10x,\textcolor{stringliteral}{"VP"},10x,\textcolor{stringliteral}{"TE"},10x,\textcolor{stringliteral}{"CS"},9x,\textcolor{stringliteral}{"CFLN"},9x,\textcolor{stringliteral}{"WW"},10x,\textcolor{stringliteral}{"SS"},
2807      &     9x,\textcolor{stringliteral}{"MDOT"},9x,\textcolor{stringliteral}{"HH"},10x,\textcolor{stringliteral}{"ES1"},9x,\textcolor{stringliteral}{"WS"},9x,\textcolor{stringliteral}{"BETA"},9x,\textcolor{stringliteral}{"TAU"})
2808 \textcolor{comment}{c     1002   format (4x,"J",5x,"R",11x,"DR",10x,"DE",10x,"VX",}
2809 \textcolor{comment}{c     &        10x,"VP",10x,"TE",10x,"CS",9x,"WW",10x,"SS",}
2810 \textcolor{comment}{c     &        9x,"MDOT",9x,"HH",10x,"BETA",9x,"TAU")}
2811  1004 \textcolor{keyword}{format} (4x,\textcolor{stringliteral}{"J"},5x,\textcolor{stringliteral}{"R"},10x,\textcolor{stringliteral}{"BETA"},8x,\textcolor{stringliteral}{"TAUEFF"},7x,\textcolor{stringliteral}{"TE"},
2812      &     10x,\textcolor{stringliteral}{"SS"},8x,\textcolor{stringliteral}{"MDOTEFF"},7x,\textcolor{stringliteral}{"MDOT"})
2813 \textcolor{comment}{c     }
2814 \textcolor{comment}{c     この行は2000/08/07に追加}
2815 \textcolor{comment}{c     imore=0でのoutput data!}
2816  1005 \textcolor{keyword}{format} (4x,\textcolor{stringliteral}{"J"},5x,\textcolor{stringliteral}{"R"},10x,\textcolor{stringliteral}{"BETA"},8x,\textcolor{stringliteral}{"TEFF"},8x,\textcolor{stringliteral}{"TE"},
2817      &     10x,\textcolor{stringliteral}{"SS"},10x,\textcolor{stringliteral}{"VX"},10x,\textcolor{stringliteral}{"VP"},10x,\textcolor{stringliteral}{"CS"},10x,\textcolor{stringliteral}{"HH"},
2818      &     10x,\textcolor{stringliteral}{"tauo"},8x,\textcolor{stringliteral}{"taueff"},6x,\textcolor{stringliteral}{"WW"},10x,\textcolor{stringliteral}{"WS"},10x,\textcolor{stringliteral}{"MDOT"})
2819 \textcolor{comment}{c     1005  format (4x,"J",5x,"R",10x,"BETA",9x,"TEFF",8x,"TE",}
2820 \textcolor{comment}{c     &        10x,"SS",9x,"MDOT")}
2821  1010 \textcolor{keyword}{FORMAT} (i5,20(1pe12.4))
2822  1020 \textcolor{keyword}{FORMAT} (i5,5(1pe12.4),i8)
2823  1030 \textcolor{keyword}{format} (\textcolor{stringliteral}{"CAUTION   RS < 0  AT  J ="},i3,\textcolor{stringliteral}{"  NS ="},i8,
2824      &     \textcolor{stringliteral}{"  TIME ="},e10.3)
2825  1031 \textcolor{keyword}{format} (\textcolor{stringliteral}{"CAUTION   ES < 0  AT  J ="},i3,\textcolor{stringliteral}{"  NS ="},i8,
2826      &     \textcolor{stringliteral}{"  TIME ="},e10.3)
2827 \textcolor{comment}{C     }
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=203pt]{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a6b5c43f1e7e13e568d53c774ea675e14}{}\index{accdisk.\+f@{accdisk.\+f}!prtrb1@{prtrb1}}
\index{prtrb1@{prtrb1}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{prtrb1}]{\setlength{\rightskip}{0pt plus 5cm}subroutine prtrb1 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a6b5c43f1e7e13e568d53c774ea675e14}


Definition at line 2495 of file accdisk.\+f.


\begin{DoxyCode}
2495 \textcolor{comment}{C**************************}
2496       include \textcolor{stringliteral}{'para.h'}
2497 
2498       xmdot=\hyperlink{para_8h_ad6bb721c2a785860f0ceeb83f9b91a30}{pxmdot}
2499       \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}=\hyperlink{para_8h_af943b54f34d52eaee31ddf2dda02137e}{pxmd}
2500       xlin=\hyperlink{para_8h_a3235f9122055766ce4fcbe48ce8fa436}{pxlin}
2501       \textcolor{keywordflow}{do} 10 j=1,jx-1
2502          de   = w0(j,1)
2503          vx   = w0(j,2)   
2504          te   = w0(j,4)
2505          r    = x1(j)
2506          rm1  = r-1
2507          r2   = r*r
2508          r3   = r2*r
2509          ok   = (r/rm1)*sqrt(0.5/r3)
2510          pr   = (aa/3.)*(te**4)+rmu*de*te
2511          hh   = sqrt(b5*pr/de)/ok
2512          ss   = 2*ain*de*hh*rg
2513          vx   = -xmdot/(2.*pi*r*ss)/cc
2514          w0(j,2)=vx
2515  10   \textcolor{keywordflow}{continue}
2516       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=187pt]{accdisk_8f_a6b5c43f1e7e13e568d53c774ea675e14_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_ac41237d948189d5aa4fb266c18a90125}{}\index{accdisk.\+f@{accdisk.\+f}!prtrb2@{prtrb2}}
\index{prtrb2@{prtrb2}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{prtrb2}]{\setlength{\rightskip}{0pt plus 5cm}subroutine prtrb2 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_ac41237d948189d5aa4fb266c18a90125}


Definition at line 2520 of file accdisk.\+f.


\begin{DoxyCode}
2520 \textcolor{comment}{C**************************}
2521       include \textcolor{stringliteral}{'para.h'}
2522       xmdot=\hyperlink{para_8h_ad6bb721c2a785860f0ceeb83f9b91a30}{pxmdot}
2523       \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}=\hyperlink{para_8h_af943b54f34d52eaee31ddf2dda02137e}{pxmd}
2524 \textcolor{comment}{c      xlin=pxlin}
2525 \textcolor{comment}{c      rc = x1(jx)}
2526 \textcolor{comment}{c      rp = 10.0}
2527 
2528       \textcolor{keywordflow}{do} 10 j=jx,jx
2529 \textcolor{comment}{c         CALL SADMK(X1(J),ETA,DL,W0(J,1),W0(J,2),W0(J,3),W0(J,4))}
2530 \textcolor{comment}{c         CALL SADMK2(X1(J),ETA,DL,W0(J,1),W0(J,2),W0(J,3),W0(J,4))}
2531          \textcolor{keyword}{CALL }\hyperlink{accdisk_8f_a13067349a76bff208061d738395a4a9c}{sadmn2}(x1(j),eta,dl,w0(j,1),w0(j,2),w0(j,3),w0(j,4))
2532 \textcolor{comment}{c         do 20 k=1,1}
2533 \textcolor{comment}{c            w0(j,k)=w0(j,k)}
2534 \textcolor{comment}{c     &      +rp*w0(j,k)*exp(-(x1(j)-rc)*(x1(j)-rc))}
2535 \textcolor{comment}{c 20      continue}
2536 
2537  10   \textcolor{keywordflow}{continue}
2538       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{accdisk_8f_ac41237d948189d5aa4fb266c18a90125_cgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a56bd1e0e2e7bf956544564f5fdb31ff9}{}\index{accdisk.\+f@{accdisk.\+f}!prtrb3@{prtrb3}}
\index{prtrb3@{prtrb3}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{prtrb3}]{\setlength{\rightskip}{0pt plus 5cm}subroutine prtrb3 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a56bd1e0e2e7bf956544564f5fdb31ff9}


Definition at line 2542 of file accdisk.\+f.


\begin{DoxyCode}
2542 \textcolor{comment}{C**************************}
2543       include \textcolor{stringliteral}{'para.h'}
2544       dimension ww(4)
2545 \textcolor{comment}{c      xmdot=pxmdot}
2546 \textcolor{comment}{c      xmd=pxmd}
2547 \textcolor{comment}{c      xlin=pxlin}
2548 \textcolor{comment}{c      CALL SADMK(X1(JX),ETA,DL,ww(1),ww(2),ww(3),ww(4))}
2549 \textcolor{comment}{c-----------------------}
2550 \textcolor{comment}{c      rc     : Radius }
2551 \textcolor{comment}{c      xlamda : wave length}
2552 \textcolor{comment}{c      rp     : amplitude of the wave }
2553 \textcolor{comment}{c-----------------------}
2554 \textcolor{comment}{c     rc=x1(JX)}
2555       rc=50.0
2556 \textcolor{comment}{c      xlamda=pxlin}
2557       xlamda=1.0
2558       rp=1.0
2559       \textcolor{keywordflow}{do} 10 j=1,jx-1
2560          \textcolor{keywordflow}{do} 20 k=1,4
2561             w0(j,k)=w0(j,k)
2562      &      +rp*w0(j,k)*exp(-(x1(j)-rc)*(x1(j)-rc)/xlamda/xlamda)
2563 \textcolor{comment}{c     &           -rp*w0(j,k)*exp(-(x1(j)-rc)*(x1(j)-rc)/xlamda/xlamda)}
2564  20      \textcolor{keywordflow}{continue}
2565  10   \textcolor{keywordflow}{continue}
2566 \textcolor{comment}{c      write(6,*) "PERTRB 3"}
2567       \textcolor{keywordflow}{return}
\end{DoxyCode}
\hypertarget{accdisk_8f_ae05549904b3a2ceb4d2400464fe3d182}{}\index{accdisk.\+f@{accdisk.\+f}!prtrb4@{prtrb4}}
\index{prtrb4@{prtrb4}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{prtrb4}]{\setlength{\rightskip}{0pt plus 5cm}subroutine prtrb4 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_ae05549904b3a2ceb4d2400464fe3d182}


Definition at line 2572 of file accdisk.\+f.


\begin{DoxyCode}
2572 \textcolor{comment}{C**************************}
2573       include \textcolor{stringliteral}{'para.h'}
2574       dimension ww(4)
2575 \textcolor{comment}{c      xmdot=pxmdot}
2576 \textcolor{comment}{c      xmd=pxmd}
2577 \textcolor{comment}{c-----------------------}
2578 \textcolor{comment}{c      rc     : Radius }
2579 \textcolor{comment}{c      xlamda : wave length}
2580 \textcolor{comment}{c      rp     : amplitude of the wave }
2581 \textcolor{comment}{c-----------------------}
2582       rc=30.0
2583 \textcolor{comment}{c     xlamda=pxlin}
2584       xkk=30
2585       rp=2.0
2586 
2587       \textcolor{keywordflow}{do} 10 j=1,jx-1
2588          de   = w0(j,1)
2589          vx   = w0(j,2)   
2590          te   = w0(j,4)
2591          r    = x1(j)
2592          rm1  = r-1
2593          r2   = r*r
2594          r3   = r2*r
2595          ok   = (r/rm1)*sqrt(0.5/r3)
2596          pr   = (aa/3.)*(te**4)+rmu*de*te
2597          hh   = sqrt(b5*pr/de)/ok
2598          ss   = 2*ain*de*hh*rg
2599          vx   = -xmdot/(2.*pi*r*ss)/cc
2600          w0(j,2)=vx
2601 
2602 \textcolor{comment}{c         do 20 k=1,1}
2603 \textcolor{comment}{c            dss = 0.01*exp(-(x1(j)-rc)**2/0.1**2)*sin(xkk*x1(j))*w0(j,k)}
2604 \textcolor{comment}{c            w0(j,k)=w0(j,k)+dss}
2605  20      \textcolor{keywordflow}{continue}
2606          dww = dss/xkk/x1(j)*w0(j,1)
2607          dvr = dss/sqrt(xkk*x1(j))*w0(j,2)
2608          dvp = dss/sqrt(xkk*x1(j))*w0(j,3)
2609  10   \textcolor{keywordflow}{continue}
2610       \textcolor{keyword}{write}(6,*) \textcolor{stringliteral}{"PERTRB 4"}
2611       \textcolor{keywordflow}{return}
\end{DoxyCode}
\hypertarget{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80}{}\index{accdisk.\+f@{accdisk.\+f}!pzextr@{pzextr}}
\index{pzextr@{pzextr}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{pzextr(iest, xest, yest, yz, dy, nv)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine pzextr (
\begin{DoxyParamCaption}
\item[{integer}]{iest, }
\item[{}]{xest, }
\item[{dimension(nv)}]{yest, }
\item[{dimension(nv)}]{yz, }
\item[{dimension(nv)}]{dy, }
\item[{integer}]{nv}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80}


Definition at line 3132 of file accdisk.\+f.


\begin{DoxyCode}
3132       \textcolor{keywordtype}{implicit} \textcolor{keywordtype}{real*8} (a-h,o-z)
3133       \textcolor{keyword}{common} /lscal/ kpr
3134       \textcolor{keywordtype}{integer} iest,nv,imax,nmax,kpr
3135 \textcolor{comment}{c      real xest,dy(nv),yest(nv),yz(nv)}
3136       dimension dy(nv),yest(nv),yz(nv)
3137       \hyperlink{para_8h_a917ae1b50ccc7039d1bf4d6023818d42}{parameter}(imax=13,nmax=50)
3138       \textcolor{keywordtype}{integer} j,k1
3139 \textcolor{comment}{c      real delta,f1,f2,q,d(nmax),qcol(nmax,imax),x(imax)}
3140       dimension d(nmax),qcol(nmax,imax),x(imax)
3141       \textcolor{keywordtype}{save} qcol,x
3142 \textcolor{comment}{c --- Save current independent variable.}
3143       x(iest)=xest
3144       \textcolor{keywordflow}{do} 11 j=1,nv
3145          dy(j)=yest(j)
3146          yz(j)=yest(j)
3147  11       \textcolor{keywordflow}{continue}
3148 \textcolor{comment}{c --- Store first estimate in first column.}
3149       \textcolor{keywordflow}{if} (iest.eq.1) \textcolor{keywordflow}{then}
3150           \textcolor{keywordflow}{do} 12 j=1,nv
3151              qcol(j,1)=yest(j)
3152  12       \textcolor{keywordflow}{continue}
3153       \textcolor{keywordflow}{else}
3154           \textcolor{keywordflow}{do} 13 j=1,nv
3155              d(j)=yest(j)
3156  13       \textcolor{keywordflow}{continue}
3157           \textcolor{keywordflow}{do} 15 k1=1,iest-1
3158              delta=1./(x(iest-k1)-xest)
3159              f1=xest*delta
3160              f2=x(iest-k1)*delta   
3161 \textcolor{comment}{c --- propagate tableau 1 diagonal more.}
3162              \textcolor{keywordflow}{do} 14 j=1,nv
3163                 q=qcol(j,k1)
3164                 qcol(j,k1)=dy(j)
3165                 delta=d(j)-q
3166                 dy(j)=f1*delta
3167                 d(j)=f2*delta
3168                 yz(j)=yz(j)+dy(j)
3169  14          \textcolor{keywordflow}{continue}
3170  15       \textcolor{keywordflow}{continue}
3171           \textcolor{keywordflow}{do} 16 j=1,nv
3172              qcol(j,iest)=dy(j)
3173  16       \textcolor{keywordflow}{continue}
3174 \textcolor{keywordflow}{      endif}
3175       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=221pt]{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a28db17c574d519f8c766e740324db04f}{}\index{accdisk.\+f@{accdisk.\+f}!rdfl7@{rdfl7}}
\index{rdfl7@{rdfl7}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{rdfl7}]{\setlength{\rightskip}{0pt plus 5cm}subroutine rdfl7 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a28db17c574d519f8c766e740324db04f}


Definition at line 2877 of file accdisk.\+f.


\begin{DoxyCode}
2877 \textcolor{comment}{************************************************************************}
2878       include \textcolor{stringliteral}{'para.h'}
2879       
2880       \textcolor{keyword}{read} (7,802) jx
2881       \textcolor{keyword}{read} (7,800)
2882       \textcolor{keywordflow}{do} 10 j=1,jx
2883          \textcolor{keyword}{read} (7,803) x1(j)
2884  10   \textcolor{keywordflow}{continue}
2885  100  \textcolor{keywordflow}{continue}
2886 \textcolor{comment}{C     }
2887       \textcolor{keyword}{read} (7,800)
2888       \textcolor{keyword}{read} (7,804) ns,time
2889       \textcolor{keyword}{read} (7,800)
2890       \textcolor{keywordflow}{do} 30 j=1,jx
2891          \textcolor{keyword}{read} (7,805) (w0(j,i),i=1,4),\hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(j),\hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(j)
2892          \textcolor{keywordflow}{if} (ns.eq.0) \textcolor{keywordflow}{then}
2893             \hyperlink{para_8h_a7cd61532924e7e7ac27466efc5eddaa9}{deini}(j)=w0(j,1)
2894             \hyperlink{para_8h_a81e14a17734b24d30f0170b04e769b2f}{vxini}(j)=w0(j,2)
2895             \hyperlink{para_8h_a91397befe00716cb0627b9d32e1b30f8}{vpini}(j)=w0(j,3)
2896             \hyperlink{para_8h_a4c8584bf7b1812d3a510b3673b8f472d}{teini}(j)=w0(j,4)
2897 \textcolor{keywordflow}{         endif}
2898  30   \textcolor{keywordflow}{continue}
2899       \textcolor{keyword}{read} (7,806) dt
2900       \textcolor{keyword}{read} (7,806) \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}
2901       \textcolor{keyword}{read} (7,801) xlin
2902       \textcolor{keywordflow}{if} (ns.eq.0) xmdi=\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}
2903 \textcolor{comment}{C     }
2904       \textcolor{keyword}{call }\hyperlink{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87}{file}
2905 \textcolor{comment}{c     call print}
2906       \textcolor{keywordflow}{if} (ns.ne.lns) \textcolor{keywordflow}{goto} 100
2907       xmdot=\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}*xmcrit
2908  800  \textcolor{keyword}{format} (80x)
2909  801  \textcolor{keyword}{format} (13x,f18.14)
2910  802  \textcolor{keyword}{format} (5x,i4)
2911  803  \textcolor{keyword}{format} (4x,1pe15.7)
2912  804  \textcolor{keyword}{format} (4x,i12,8x,f12.3)
2913  805  \textcolor{keyword}{format} (7x,6(1pe22.14),i3)
2914  806  \textcolor{keyword}{format} (13x,e11.3)
2915       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=276pt]{accdisk_8f_a28db17c574d519f8c766e740324db04f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=180pt]{accdisk_8f_a28db17c574d519f8c766e740324db04f_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a473b1c16022f12251cb3e8402cb8df6e}{}\index{accdisk.\+f@{accdisk.\+f}!rdprm@{rdprm}}
\index{rdprm@{rdprm}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{rdprm}]{\setlength{\rightskip}{0pt plus 5cm}subroutine rdprm (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a473b1c16022f12251cb3e8402cb8df6e}


Definition at line 91 of file accdisk.\+f.


\begin{DoxyCode}
91 \textcolor{comment}{C*************************}
92 
93       include \textcolor{stringliteral}{'para.h'}
94 
95 \textcolor{comment}{C***** CONSTANTS *****}
96       aa    = 7.56464e-15       \textcolor{comment}{! Radiation constant (erg/cm^3/K^4)}
97       cc    = 2.997925e10       \textcolor{comment}{! Speed of light}
98       gg    = 6.672e-8          \textcolor{comment}{! Gravitational constant}
99       xmu   = 0.5               \textcolor{comment}{! 1/2}
100       xmh   = 1.660531e-24      \textcolor{comment}{! Atomic mass (g)}
101       xkb   = 1.38062e-16       \textcolor{comment}{! Boltzman constant (erg/K)}
102       rmu   = xkb/(xmu*xmh)     \textcolor{comment}{! 2 xkb/xmh (coefficient of gas pres) }
103       xmsun = 1.989e33          \textcolor{comment}{! Solar mass (g)}
104       xkes  = 0.34           \textcolor{comment}{! Electron Scattering Opacity:}
105 \textcolor{comment}{c     XKKR  = 0.34*6E24      ! Free-free opacity coefficient}
106 \textcolor{comment}{c      xkes  = 0.4}
107       xkkr  = 0.64e23
108       xeff  = 6.22e20
109 \textcolor{comment}{c}
110 \textcolor{comment}{c----- Ho-shi's parameter(1977) ----------------------------------------}
111       npl   = 3                 \textcolor{comment}{! Polytropic index (gamma=1+1/N)}
112       xnpl1 = npl+1             \textcolor{comment}{! XNPL1:N+1}
113       ain   = \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin}(npl)         \textcolor{comment}{! I\_N -> related to heght integration. }
114       ainp1 = \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin}(npl+1)       \textcolor{comment}{! AIN   : I\_N}
115       ainp1 = \hyperlink{accdisk_8f_a7e558bccb3f95be3983342bf41e0ddef}{fnin}(npl+1)       \textcolor{comment}{! AINP1 : I\_N+1}
116       ajn   = \hyperlink{accdisk_8f_a0b66793a1932f6312b141b0d46546864}{fnjn}(2*npl)       \textcolor{comment}{! AJN   : I\_2N }
117 \textcolor{comment}{c----- Specific heat ? -----}
118       gm    = 5./3.
119       gm1   = gm-1.
120       pi    = 3.14159263
121 \textcolor{comment}{C     }
122 \textcolor{comment}{C     ***** READ PARAMETERS *****}
123 \textcolor{comment}{C     }
124       \textcolor{keyword}{open} (9,\hyperlink{accdisk_8f_ab705cb76f9c57d6e262141e9ff5a5f87}{file}=\textcolor{stringliteral}{"at.job"},status=\textcolor{stringliteral}{"old"}) \textcolor{comment}{! Data input }
125       \textcolor{keyword}{read} (9,*)
126       \textcolor{keyword}{read} (9,*)
127       \textcolor{keyword}{read} (9,901) date
128       \textcolor{keyword}{read} (9,*)
129       \textcolor{keyword}{read} (9,*) bhm,alpha,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd},xlinm,xlinp
130       \textcolor{keyword}{read} (9,*)
131       \textcolor{keyword}{read} (9,*) mesh,rin,rin2,rout1,rout2
132       \textcolor{keyword}{read} (9,*)
133       \textcolor{keyword}{read} (9,*) dt,dtmax,dtmin,nsx,lns
134       \textcolor{keyword}{read} (9,*)
135       \textcolor{keyword}{read} (9,*) (iprint(i),i=1,4),ksfl,irstrt
136       \textcolor{keyword}{read} (9,*)
137       \textcolor{keyword}{read} (9,*) \hyperlink{para_8h_a898f6fd21d1ac7dcb5bde1fbe8163bde}{hini},\hyperlink{para_8h_ab322f8c44aff74e795741b5a2ffb1d4a}{relerr},abserr,qb,qu
138       \textcolor{keyword}{read} (9,*)
139       \textcolor{keyword}{read} (9,902) \hyperlink{para_8h_afe8fad7a0aca24881ee34a8cb492e8f9}{ki},\hyperlink{para_8h_ad49368d33f04f93d1722bd14f030cc0d}{file7},\hyperlink{para_8h_ab7dfa13ba0b4c472a3104c3e756d1e82}{file8},imore,\hyperlink{para_8h_ad82ac7e23eb3cb49113ff1efc3893b65}{xkappa}
140       \textcolor{keyword}{read} (9,*)
141       \textcolor{keyword}{read} (9,903) klc,\hyperlink{para_8h_a8474764c836b26d8a308643b24147536}{file9},file10
142       \textcolor{keyword}{read} (9,*)
143       \textcolor{keyword}{read} (9,*) kr,\hyperlink{para_8h_af943b54f34d52eaee31ddf2dda02137e}{pxmd},\hyperlink{para_8h_a3235f9122055766ce4fcbe48ce8fa436}{pxlin},\hyperlink{para_8h_a3268453eb71eb520676edd8f1922d36a}{kcool}
144       \textcolor{keyword}{read} (9,*) 
145       \textcolor{keyword}{read} (9,*) ktcond
146       \textcolor{keyword}{read} (9,*)
147       \textcolor{keyword}{read} (9,*) cfc 
148 
149  901  \textcolor{keyword}{format} (4x,a10)
150  902  \textcolor{keyword}{format} (4x,i2,7x,a6,4x,a6,4x,i2,8x,e12.5)
151  903  \textcolor{keyword}{format} (4x,i6,3x,a6,4x,a8)
152 \textcolor{comment}{C}
153 \textcolor{comment}{C ***** WRITE INPUT PARAMETERS *****}
154 \textcolor{comment}{C}
155       \textcolor{keyword}{WRITE} (6,*) \textcolor{stringliteral}{'***** INPUT PARAMETERS *****'}, date
156       \textcolor{keyword}{WRITE} (6,100) bhm,alpha,\hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd},xlinm,xlinp
157       \textcolor{keyword}{WRITE} (6,200) mesh,rin,rout1,rout2
158       \textcolor{keyword}{WRITE} (6,300) dt,dtmax,dtmin,nsx
159 \textcolor{comment}{c     WRITE (6,400) (IPRINT(I),I=1,4),KSFL}
160       \textcolor{keyword}{WRITE} (6,400) qb,qu,\hyperlink{para_8h_ad82ac7e23eb3cb49113ff1efc3893b65}{xkappa}
161       \textcolor{keyword}{write} (6,500) \hyperlink{para_8h_a898f6fd21d1ac7dcb5bde1fbe8163bde}{hini},\hyperlink{para_8h_ab322f8c44aff74e795741b5a2ffb1d4a}{relerr},abserr
162 \textcolor{comment}{C}
163  100  \textcolor{keyword}{FORMAT} (/1h ,\textcolor{stringliteral}{'BHM  ='},1pe15.7,5x,\textcolor{stringliteral}{'ALPHA='},1pe15.7,5x,\textcolor{stringliteral}{'XMDOT='},
164      *     1pe15.7/1h ,\textcolor{stringliteral}{'XLINM='},1pe15.7,5x,\textcolor{stringliteral}{'XLINP='},1pe15.7)
165  200  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'MESH ='},i15,5x,\textcolor{stringliteral}{'RIN  ='}
166      *     ,1pe15.7/1h ,\textcolor{stringliteral}{'ROUT1='},1pe15.7,5x,\textcolor{stringliteral}{'ROUT2='},1pe15.7)
167  300  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'DT   ='},1pe15.7,5x,\textcolor{stringliteral}{'DTMAX='},1pe15.7,5x,\textcolor{stringliteral}{'DTMIN='},
168      *     1pe15.7/1h ,\textcolor{stringliteral}{'NSX  ='},i15)
169 \textcolor{comment}{c     400   FORMAT (1H ,'IPRINT=',4(I6),5X,'KSFL =',I8//)}
170  400  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'QB='},1pe15.7,5x,\textcolor{stringliteral}{"QU="},1pe15.7,5x,\textcolor{stringliteral}{'XKAPPA='},
171      *     1pe15.7,//)
172  500  \textcolor{keyword}{format} (1h ,\textcolor{stringliteral}{"HINI="},1pe9.1,5x,\textcolor{stringliteral}{"RELERR="},1pe9.1,5x
173      &     ,\textcolor{stringliteral}{"ABSERR="},1pe9.1//) 
174 \textcolor{comment}{C     }
175 \textcolor{comment}{c--- B1,B2,B3,B4,B5 -> vertical integration factor (for normalize). ---}
176 \textcolor{comment}{c}
177       rg     = 2.*gg*bhm*xmsun/(cc*cc) \textcolor{comment}{!  Schwarzschild radius (cm) }
178 \textcolor{comment}{c      XMCRIT = 32.*PI*CC*RG/XKES}
179       xmcrit = 2.*pi*cc*rg/xkes \textcolor{comment}{! Critical accretion rate (L\_E/eta/c^2)}
180       xmdi   = \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}              \textcolor{comment}{! normalized accretion rate}
181       xmdot  = \hyperlink{para_8h_a2ed7eb901f42f8ccd9fac68ff6f18ed4}{xmd}*xmcrit              
182       \hyperlink{para_8h_ad6bb721c2a785860f0ceeb83f9b91a30}{pxmdot} = \hyperlink{para_8h_af943b54f34d52eaee31ddf2dda02137e}{pxmd}*xmcrit
183       al7    = alpha**7
184       ai5    = (ain**5)/(ainp1**4)
185       ff1    = (128.*pi*pi*aa*cc/(3.*xkes*xmdot*xmdot*al7))*ai5
186      *     *((cc/rmu)**4)*((cc*rg)**3)
187       b1 = ain*cc*rg*rg
188       b2 = (ainp1/ain)/(cc*cc)
189       b3 = ainp1*rg*rg/cc
190       b4 = rg/(cc*cc)
191       b5 = 2.*xnpl1/(cc*cc)
192 
193       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=278pt]{accdisk_8f_a473b1c16022f12251cb3e8402cb8df6e_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=187pt]{accdisk_8f_a473b1c16022f12251cb3e8402cb8df6e_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc}{}\index{accdisk.\+f@{accdisk.\+f}!sadmk@{sadmk}}
\index{sadmk@{sadmk}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{sadmk(\+R, E\+T\+A, D\+L)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine sadmk (
\begin{DoxyParamCaption}
\item[{}]{R, }
\item[{}]{E\+T\+A, }
\item[{}]{D\+L}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc}


Definition at line 266 of file accdisk.\+f.


\begin{DoxyCode}
266 \textcolor{comment}{C******************************************}
267 \textcolor{comment}{C}
268 \textcolor{comment}{C -------------------------------------------------------------------}
269 \textcolor{comment}{C     STANDARD ACCRETION DISK MODEL}
270 \textcolor{comment}{C     OPTICALLY THICK, GEOMETRICALLY THIN, KEPLERIAN, ALPHA-MODEL}
271 \textcolor{comment}{C     PSEUDO NEWTONIAN POTENTIAL}
272 \textcolor{comment}{C}
273 \textcolor{comment}{C     ETA = (VR**2)/(WW/SS)     DL = XL-XLK}
274 \textcolor{comment}{C --------------------------------------------------------------------}
275 \textcolor{comment}{C}
276       include \textcolor{stringliteral}{'para.h'}
277 \textcolor{comment}{C}
278       dimension ph(4)
279 \textcolor{comment}{C}
280 \textcolor{comment}{c      print *,"SADMK"}
281       xkes1 = xkes
282       xkkr1 = xkkr
283 
284       rm1   = r-1
285       r2    = r*r
286       r3    = r2*r
287       eps   = 1.0e-6
288 
289       ok    = (r/rm1)*sqrt(.5/r3) \textcolor{comment}{! OK : Kepler angular velocity }
290       vk    = r*ok              \textcolor{comment}{! VK : Kepler velocity}
291       xlk   = r*vk              \textcolor{comment}{! XLK : Kepler angular momentum  }
292       dlkdr = xlk*(1.5/r - 1./rm1) \textcolor{comment}{!DLKDR : dlnLk/dr }
293       dlnok = -1./rm1 - .5/r    \textcolor{comment}{!DLNOK : d(lnOK)/dlnR}
294       ww    = xmdot*(xlk-xlin)/(2.*pi*b3*r*r*alpha)
295       ff2   = (-3.*xkes1*b3*r*alpha*ww*ok*dlnok/(32.*b4*aa*cc))*ww
296       ff3   = ok*ok*ww*ww/(4.*b5)
297       ff4   = (aa/3.)*(ff2**0.9)/(sqrt(ff3)*(rmu**0.4))
298       betan = 0.01
299       betax = 1.00
300       \textcolor{keywordflow}{DO} 10 i=1,10
301          beta  = 0.5*(betan+betax)
302          fff   = 1.-beta-ff4*(beta**0.4)
303          \textcolor{keywordflow}{IF} (fff .GT. 0.) betan=beta
304          \textcolor{keywordflow}{IF} (fff .LE. 0.) betax=beta
305 10    \textcolor{keywordflow}{CONTINUE}
306 \textcolor{comment}{C}
307 \textcolor{comment}{c      print *,"S1"}
308       pr = (3./aa)*(ff3/ff2)*(1.-beta)\textcolor{comment}{! Pressure (at equatrial plane)}
309       de = (pr**3)/ff3          \textcolor{comment}{!DE : density (g/cm^3)}
310       te = (de*ff2/pr)**0.25    \textcolor{comment}{!TE : temperature (K)}
311       hh = (sqrt(b5*pr/de))/ok  \textcolor{comment}{!HH : Scale height    }
312       vr = xmdot/(4.*pi*b1*r*de*hh) \textcolor{comment}{!VR : radial velocity }
313 \textcolor{comment}{c      write(6,*) pr,de,te}
314 \textcolor{comment}{c      write(6,*) hh,vr}
315 \textcolor{comment}{C}
316 \textcolor{comment}{C ***** CORRECTION FOR OPACITY *****}
317 \textcolor{comment}{C}
318 \textcolor{comment}{C    --- ITERATION ---}
319 \textcolor{comment}{c ----------------------------------------------------------------------}
320 \textcolor{comment}{c     PR   : a/3 * TE^4 (radiation pressure)+2kb/mh*de*TE (gas pressure)}
321 \textcolor{comment}{c     BETA : P\_gas (Gas pressure)/P\_total (Total pressure)}
322 \textcolor{comment}{c     DEMN : I\_N DE (mean density)}
323 \textcolor{comment}{c     TEMN : 2/3*TE (mean temperature)}
324 \textcolor{comment}{c     XKFF : Free-Free opacity}
325 \textcolor{comment}{c     XK   : Mean Opacity}
326 \textcolor{comment}{c     XKXF : free-free opacity/mean opacity}
327 \textcolor{comment}{c     HH   : Scale Height }
328 \textcolor{comment}{c     FM   : Radiative flux}
329 \textcolor{comment}{c     FF3  :}
330 \textcolor{comment}{c     FF4  : }
331 \textcolor{comment}{c ----------------------------------------------------------------------}
332 \textcolor{comment}{c      print *,"S2"}
333       \textcolor{keywordflow}{DO} 200 itr=1,20
334          pr   = (aa/3.)*(te**4)+rmu*de*te
335 \textcolor{comment}{c     if (pr.le.0.) print *,"PR=",pr,itr}
336          beta = rmu*de*te/pr
337          demn = ain*de
338          temn = 2.*te/3.
339          xkff = xkkr1*demn*(temn**(-3.5))
340          xk   = xkes1+xkff
341 \textcolor{comment}{c     if (xk.le.0.) print *,"XK=",xk}
342          xkxf = xkff/xk
343          hh   = (sqrt(b5*pr/de))/ok
344 \textcolor{comment}{c     }
345 \textcolor{comment}{c      write(6,*) itr,pr,beta}
346 \textcolor{comment}{c}
347          \textcolor{keywordflow}{if} (de.le.0.) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"DE1="},de
348          \textcolor{keywordflow}{if} (hh.le.0.) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"HH="},hh
349 
350          fm   = 2.*pi*b4*r*16.*aa*cc*(te**4)/(3.*xk*de*hh)
351          ff3  = 4.*pi*b3*r*r*alpha*pr*hh
352          ff4  = -xmdot*(xlk-xlin)*ok*dlnok
353 \textcolor{comment}{C     }
354          ph(3)= xmdot*(xlk-xlin)-ff3
355          ph(4)= ff4-fm
356 \textcolor{comment}{C     }
357          a1 = 1.-beta
358          a4 = 4.-3.*beta
359 \textcolor{comment}{C}
360 \textcolor{comment}{c     if (te.le.0.) print *,"TE=",te}
361          dlnhdd = -0.5*a1/de
362          dlnhdt = 0.5*a4/te
363          dlnpdd = beta/de
364          dlnpdt = a4/te
365          dlnkdd = xkxf/de
366          dlnkdt = -3.5*xkxf/te
367          dlnfdd = -dlnkdd-dlnhdd-1./de
368          dlnfdt = 4./te-dlnkdt-dlnhdt
369 \textcolor{comment}{C}
370 \textcolor{comment}{c ---------------------------------------------}
371 \textcolor{comment}{c         | D3DD D3DT |}
372 \textcolor{comment}{c    det. |           | == D3DD*D4DT-D3DT*D4DD}
373 \textcolor{comment}{c         | D4DD D4DT |}
374 \textcolor{comment}{c ---------------------------------------------}
375 \textcolor{comment}{C   ** JACOBIANS **}
376 \textcolor{comment}{C}
377          d3dd = -ff3*(dlnpdd+dlnhdd)
378          d3dt = -ff3*(dlnpdt+dlnhdt)
379          d4dd = -fm*dlnfdd
380          d4dt = -fm*dlnfdt
381          det  = d3dd*d4dt-d3dt*d4dd
382 \textcolor{comment}{C}
383 \textcolor{comment}{c --------------------------------------------}
384 \textcolor{comment}{c    |D3DD D3DT| |DELD| = |PH(3)|}
385 \textcolor{comment}{c    |D4DD D4DT| |DELT|   |PH(4)|}
386 \textcolor{comment}{c}
387 \textcolor{comment}{c    |DELD|    1  |D4DT -D3DT| |PH(3)|  }
388 \textcolor{comment}{c    |    | = --- |          |*|     |}
389 \textcolor{comment}{c    |DELT|   det.|-D4DD D3DD| |PH(4)|}
390 \textcolor{comment}{c --------------------------------------------}
391 \textcolor{comment}{C   ** CORRECTIONS **}
392 \textcolor{comment}{C}
393 \textcolor{comment}{c      if (det.le.0.) print *,"DET=",det}
394          deld = (ph(3)*d4dt-ph(4)*d3dt)/det
395          delt = (d3dd*ph(4)-d4dd*ph(3))/det
396 \textcolor{comment}{C}
397 \textcolor{comment}{C   ** APPLY CORRECTIONS **}
398 \textcolor{comment}{C}
399          de = de-deld
400          te = te-delt
401 \textcolor{comment}{c     WRITE (6,40) ITR,DE,TE}
402  40      \textcolor{keyword}{FORMAT} (1h ,i7,5x,\textcolor{stringliteral}{'DE ='},1pe12.4,5x,\textcolor{stringliteral}{'TE ='},1pe12.4)
403 \textcolor{comment}{C}
404 \textcolor{comment}{C   ** CHECK CONVERGENCE **}
405 \textcolor{comment}{C}
406 \textcolor{comment}{c       if (de.le.0.) print *,"DE2=",de}
407 \textcolor{comment}{c       if (te.le.0.) print *,"TE=",te}
408          \textcolor{keywordflow}{IF} (abs(deld/de) .GE. eps) \textcolor{keywordflow}{GO TO} 100
409          \textcolor{keywordflow}{IF} (abs(delt/te) .GE. eps) \textcolor{keywordflow}{GO TO} 100
410 \textcolor{comment}{C     }
411          \textcolor{keywordflow}{GO TO} 300
412 \textcolor{comment}{C     }
413  100     \textcolor{keywordflow}{CONTINUE}
414  200  \textcolor{keywordflow}{CONTINUE}
415 \textcolor{comment}{C}
416       \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,210)
417  210  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'LOOP COUNT (SADM) IS OVER MAXIMUM !'})
418       stop
419 \textcolor{comment}{C}
420  300  \textcolor{keywordflow}{CONTINUE}
421 \textcolor{comment}{C}
422 \textcolor{comment}{c----- Physical Quantities at ROUT (in SSD). -----}
423 \textcolor{comment}{c     }
424       pr    = (aa/3.)*(te**4)+rmu*de*te
425       hh    = (sqrt(b5*pr/de))/ok
426 \textcolor{comment}{c      if (hh.le.0.) print *,"HH=",hh}
427       vr    = xmdot/(4.*pi*b1*r*hh*de)
428       eta   = vr*vr/(b2*pr/de)
429       ws    = ((xlk-xlin)**2)*eta/(r2*alpha*alpha)
430 \textcolor{comment}{c      if (xlk-xlin.eq.0.) print *,"XLK-XLIN",xlk-xlin}
431       dlnwr = -2./r+dlkdr/(xlk-xlin)
432       dl    = r3*ws*(dlnwr+dlnok)/(2.*xlk)
433 \textcolor{comment}{C}
434       vx =-vr                   \textcolor{comment}{! radial velocity}
435       vp = dl/r                 \textcolor{comment}{! rotational velocity}
436       demn  = ain*de            \textcolor{comment}{! Mean density}
437       temn  = 2*te/3.0          \textcolor{comment}{! Mean temperature}
438 \textcolor{comment}{c      TAUES  = 2.*XKES*DE*HH*RG}
439       taues = xkes*de*hh*rg     \textcolor{comment}{! Optical depth (electron scattering)}
440       xkff  = xkkr*demn*(temn**(-3.5)) \textcolor{comment}{! Mean Free-Free opacity}
441 \textcolor{comment}{c      TAUFF = 2.*XKFF*DE*HH*RG}
442       tauff = xkff*de*hh*rg     \textcolor{comment}{! Optical depth (free-free absorption)}
443 \textcolor{comment}{c      if (tauff.le.0) print *,"TAUABS=",tauff,"LW1D4"}
444       qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg \textcolor{comment}{! Brems cooling }
445       taup  = qbr/(8.*aa*cc*(te**4)) \textcolor{comment}{! Optical depth (planck)}
446       tau   = taues+tauff       \textcolor{comment}{! Total optical depth }
447       \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(jx)=taup 
448       \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(jx)=tau
449       ss    = 2*ain*de*hh*rg    \textcolor{comment}{! Surface density}
450 \textcolor{comment}{c      WRITE(6,1010) TIME,SS,TE,XMD}
451 \textcolor{comment}{C}
452       \textcolor{keywordflow}{IF} (iprint(1) .EQ. 0) \textcolor{keywordflow}{RETURN}
453 \textcolor{comment}{C}
454 \textcolor{comment}{c}
455       \textcolor{keywordflow}{if} (imore.eq.2)  \textcolor{keyword}{WRITE} (6,400) de,vr,dl,te,eta
456 400   \textcolor{keyword}{FORMAT} (/1h ,\textcolor{stringliteral}{'***** STANDARD MODEL *****'}//1h ,\textcolor{stringliteral}{'DE   ='},1pe15.7,
457      *            5x,\textcolor{stringliteral}{'VR   ='},1pe15.7,5x,\textcolor{stringliteral}{'DL   ='},1pe15.7/1h ,\textcolor{stringliteral}{'TE   ='},
458      *               1pe15.7,5x,\textcolor{stringliteral}{'ETA  ='},1pe15.7//)
459 1010  \textcolor{keyword}{FORMAT} (20(1pe12.4))
460 \textcolor{comment}{C}
461 \textcolor{comment}{c      print *,"S-END"}
462       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=284pt]{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=269pt]{accdisk_8f_a451839e12a0971af6a08288a6bf5a0dc_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a8ac2c9ba52dcbd96487877fde4eba585}{}\index{accdisk.\+f@{accdisk.\+f}!sadmk2@{sadmk2}}
\index{sadmk2@{sadmk2}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{sadmk2(\+R, E\+T\+A, D\+L, D\+E, V\+X, V\+P, T\+E)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine sadmk2 (
\begin{DoxyParamCaption}
\item[{}]{R, }
\item[{}]{E\+T\+A, }
\item[{}]{D\+L, }
\item[{}]{D\+E, }
\item[{}]{V\+X, }
\item[{}]{V\+P, }
\item[{}]{T\+E}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a8ac2c9ba52dcbd96487877fde4eba585}


Definition at line 467 of file accdisk.\+f.


\begin{DoxyCode}
467 \textcolor{comment}{C******************************************}
468 \textcolor{comment}{C}
469       include \textcolor{stringliteral}{'para.h'}
470 \textcolor{comment}{C}
471       dimension ph(4)
472 \textcolor{comment}{C}
473 \textcolor{comment}{c      print *,"SADMK"}
474       xkes1 = xkes
475       xkkr1 = xkkr
476 
477       rm1   = r-1
478       r2    = r*r
479       r3    = r2*r
480       eps   = 1.0e-6
481 
482       ok    = (r/rm1)*sqrt(.5/r3) \textcolor{comment}{! OK : Kepler angular velocity }
483       vk    = r*ok              \textcolor{comment}{! VK : Kepler velocity}
484       xlk   = r*vk              \textcolor{comment}{! XLK : Kepler angular momentum  }
485       dlkdr = xlk*(1.5/r - 1./rm1) \textcolor{comment}{!DLKDR : dlnLk/dr }
486       dlnok = -1./rm1 - .5/r    \textcolor{comment}{!DLNOK : d(lnOK)/dlnR}
487       ww    = xmdot*(xlk-xlin)/(2.*pi*b3*r*r*alpha)
488       ff2   = (-3.*xkes1*b3*r*alpha*ww*ok*dlnok/(32.*b4*aa*cc))*ww
489       ff3   = ok*ok*ww*ww/(4.*b5)
490       ff4   = (aa/3.)*(ff2**0.9)/(sqrt(ff3)*(rmu**0.4))
491       betan = 0.01
492       betax = 1.00
493       \textcolor{keywordflow}{DO} 10 i=1,10
494          beta  = 0.5*(betan+betax)
495          fff   = 1.-beta-ff4*(beta**0.4)
496          \textcolor{keywordflow}{IF} (fff .GT. 0.) betan=beta
497          \textcolor{keywordflow}{IF} (fff .LE. 0.) betax=beta
498 10    \textcolor{keywordflow}{CONTINUE}
499 \textcolor{comment}{C}
500 \textcolor{comment}{c      print *,"S1"}
501       pr = (3./aa)*(ff3/ff2)*(1.-beta)\textcolor{comment}{! Pressure (at equatrial plane)}
502       de = (pr**3)/ff3          \textcolor{comment}{!DE : density (g/cm^3)}
503       te = (de*ff2/pr)**0.25    \textcolor{comment}{!TE : temperature (K)}
504       hh = (sqrt(b5*pr/de))/ok  \textcolor{comment}{!HH : Scale height    }
505       vr = xmdot/(4.*pi*b1*r*de*hh) \textcolor{comment}{!VR : radial velocity }
506 \textcolor{comment}{c      print *,"S2"}
507       \textcolor{keywordflow}{DO} 200 itr=1,20
508          pr   = (aa/3.)*(te**4)+rmu*de*te
509 \textcolor{comment}{c     if (pr.le.0.) print *,"PR=",pr,itr}
510          beta = rmu*de*te/pr
511          demn = ain*de
512          temn = 2.*te/3.
513          xkff = xkkr1*demn*(temn**(-3.5))
514          xk   = xkes1+xkff
515 \textcolor{comment}{c     if (xk.le.0.) print *,"XK=",xk}
516          xkxf = xkff/xk
517          hh   = (sqrt(b5*pr/de))/ok
518 \textcolor{comment}{c     }
519 \textcolor{comment}{c      write(6,*) itr,pr,beta}
520 \textcolor{comment}{c}
521          \textcolor{keywordflow}{if} (de.le.0.) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"DE1="},de
522          \textcolor{keywordflow}{if} (hh.le.0.) \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,\textcolor{stringliteral}{"HH="},hh
523 
524          fm   = 2.*pi*b4*r*16.*aa*cc*(te**4)/(3.*xk*de*hh)
525          ff3  = 4.*pi*b3*r*r*alpha*pr*hh
526          ff4  = -xmdot*(xlk-xlin)*ok*dlnok
527 \textcolor{comment}{C     }
528          ph(3)= xmdot*(xlk-xlin)-ff3
529          ph(4)= ff4-fm
530 \textcolor{comment}{C     }
531          a1 = 1.-beta
532          a4 = 4.-3.*beta
533 \textcolor{comment}{C}
534 \textcolor{comment}{c     if (te.le.0.) print *,"TE=",te}
535          dlnhdd = -0.5*a1/de
536          dlnhdt = 0.5*a4/te
537          dlnpdd = beta/de
538          dlnpdt = a4/te
539          dlnkdd = xkxf/de
540          dlnkdt = -3.5*xkxf/te
541          dlnfdd = -dlnkdd-dlnhdd-1./de
542          dlnfdt = 4./te-dlnkdt-dlnhdt
543 \textcolor{comment}{C}
544 \textcolor{comment}{c ---------------------------------------------}
545 \textcolor{comment}{c         | D3DD D3DT |}
546 \textcolor{comment}{c    det. |           | == D3DD*D4DT-D3DT*D4DD}
547 \textcolor{comment}{c         | D4DD D4DT |}
548 \textcolor{comment}{c ---------------------------------------------}
549 \textcolor{comment}{C   ** JACOBIANS **}
550 \textcolor{comment}{C}
551          d3dd = -ff3*(dlnpdd+dlnhdd)
552          d3dt = -ff3*(dlnpdt+dlnhdt)
553          d4dd = -fm*dlnfdd
554          d4dt = -fm*dlnfdt
555          det  = d3dd*d4dt-d3dt*d4dd
556 \textcolor{comment}{C}
557 \textcolor{comment}{C   ** CORRECTIONS **}
558 \textcolor{comment}{C}
559 \textcolor{comment}{c      if (det.le.0.) print *,"DET=",det}
560          deld = (ph(3)*d4dt-ph(4)*d3dt)/det
561          delt = (d3dd*ph(4)-d4dd*ph(3))/det
562 \textcolor{comment}{C}
563 \textcolor{comment}{C   ** APPLY CORRECTIONS **}
564 \textcolor{comment}{C}
565          de = de-deld
566          te = te-delt
567 \textcolor{comment}{c     WRITE (6,40) ITR,DE,TE}
568  40      \textcolor{keyword}{FORMAT} (1h ,i7,5x,\textcolor{stringliteral}{'DE ='},1pe12.4,5x,\textcolor{stringliteral}{'TE ='},1pe12.4)
569 \textcolor{comment}{C}
570 \textcolor{comment}{C   ** CHECK CONVERGENCE **}
571 \textcolor{comment}{C}
572 \textcolor{comment}{c       if (de.le.0.) print *,"DE2=",de}
573 \textcolor{comment}{c       if (te.le.0.) print *,"TE=",te}
574          \textcolor{keywordflow}{IF} (abs(deld/de) .GE. eps) \textcolor{keywordflow}{GO TO} 100
575          \textcolor{keywordflow}{IF} (abs(delt/te) .GE. eps) \textcolor{keywordflow}{GO TO} 100
576 \textcolor{comment}{C     }
577          \textcolor{keywordflow}{GO TO} 300
578 \textcolor{comment}{C     }
579  100     \textcolor{keywordflow}{CONTINUE}
580  200  \textcolor{keywordflow}{CONTINUE}
581 \textcolor{comment}{C}
582       \textcolor{keywordflow}{if} (imore.eq.2) \textcolor{keyword}{WRITE} (6,210)
583  210  \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'LOOP COUNT (SADM) IS OVER MAXIMUM !'})
584       stop
585 \textcolor{comment}{C}
586  300  \textcolor{keywordflow}{CONTINUE}
587 \textcolor{comment}{C}
588 \textcolor{comment}{c----- Physical Quantities at ROUT (in SSD). -----}
589 \textcolor{comment}{c     }
590       pr    = (aa/3.)*(te**4)+rmu*de*te
591       hh    = (sqrt(b5*pr/de))/ok
592 \textcolor{comment}{c      if (hh.le.0.) print *,"HH=",hh}
593       vr    = xmdot/(4.*pi*b1*r*hh*de)
594       eta   = vr*vr/(b2*pr/de)
595       ws    = ((xlk-xlin)**2)*eta/(r2*alpha*alpha)
596 \textcolor{comment}{c      if (xlk-xlin.eq.0.) print *,"XLK-XLIN",xlk-xlin}
597       dlnwr = -2./r+dlkdr/(xlk-xlin)
598       dl    = r3*ws*(dlnwr+dlnok)/(2.*xlk)
599 \textcolor{comment}{C}
600       vx =-vr                   \textcolor{comment}{! radial velocity}
601       vp = dl/r                 \textcolor{comment}{! rotational velocity}
602       demn  = ain*de            \textcolor{comment}{! Mean density}
603       temn  = 2*te/3.0          \textcolor{comment}{! Mean temperature}
604 \textcolor{comment}{c      TAUES  = 2.*XKES*DE*HH*RG}
605       taues = xkes*de*hh*rg     \textcolor{comment}{! Optical depth (electron scattering)}
606       xkff  = xkkr*demn*(temn**(-3.5)) \textcolor{comment}{! Mean Free-Free opacity}
607 \textcolor{comment}{c      TAUFF = 2.*XKFF*DE*HH*RG}
608       tauff = xkff*de*hh*rg     \textcolor{comment}{! Optical depth (free-free absorption)}
609 \textcolor{comment}{c      if (tauff.le.0) print *,"TAUABS=",tauff,"LW1D4"}
610       qbr   = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg \textcolor{comment}{! Brems cooling }
611       taup  = qbr/(8.*aa*cc*(te**4)) \textcolor{comment}{! Optical depth (planck)}
612       tau   = taues+tauff       \textcolor{comment}{! Total optical depth }
613       \hyperlink{para_8h_a1c67f9add30377c4cb0636a8e761ddb0}{tauabso}(jx)=taup 
614       \hyperlink{para_8h_a447e75e74de31d297d801beab6ce4742}{tauo}(jx)=tau
615       ss    = 2*ain*de*hh*rg    \textcolor{comment}{! Surface density}
616 \textcolor{comment}{c      WRITE(6,1010) TIME,SS,TE,XMD}
617 \textcolor{comment}{C}
618       \textcolor{keywordflow}{IF} (iprint(1) .EQ. 0) \textcolor{keywordflow}{RETURN}
619 \textcolor{comment}{C}
620 \textcolor{comment}{c      print *,"S-END"}
621       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=290pt]{accdisk_8f_a8ac2c9ba52dcbd96487877fde4eba585_cgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_acd7a8d59350daf4880565b6bd3604312}{}\index{accdisk.\+f@{accdisk.\+f}!sadmn@{sadmn}}
\index{sadmn@{sadmn}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{sadmn(\+R, E\+T\+A, D\+L)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine sadmn (
\begin{DoxyParamCaption}
\item[{}]{R, }
\item[{}]{E\+T\+A, }
\item[{}]{D\+L}
\end{DoxyParamCaption}
)}\label{accdisk_8f_acd7a8d59350daf4880565b6bd3604312}


Definition at line 626 of file accdisk.\+f.


\begin{DoxyCode}
626 \textcolor{comment}{C******************************************}
627 \textcolor{comment}{c 2001/02/07 comments }
628 \textcolor{comment}{C     This subroutine is not used ! (except subroutine INTMDL)}
629 \textcolor{comment}{C -------------------------------------------------------------------}
630 \textcolor{comment}{C     STANDARD ACCRETION DISK MODEL}
631 \textcolor{comment}{C     OPTICALLY THIN, GEOMETRICALLY THIN, KEPLERIAN, ALPHA-MODEL}
632 \textcolor{comment}{C     PSEUDO NEWTONIAN POTENTIAL}
633 \textcolor{comment}{C}
634 \textcolor{comment}{C     ETA = (VR**2)/(WW/SS)     DL = XL-XLK}
635 \textcolor{comment}{C}
636 \textcolor{comment}{C --------------------------------------------------------------------}
637 \textcolor{comment}{C}
638       include \textcolor{stringliteral}{'para.h'}
639 \textcolor{comment}{C}
640       rm1 = r-1.
641       r2  = r*r
642       r3  = r2*r
643       ok  =(r/rm1)*sqrt(.5/r3)
644       vk  = r*ok
645       xlk = r*vk
646       xll = xlk-xlin
647       dlnok =-1./rm1-.5/r
648       dokdr = ok*dlnok
649       cc2 = cc*cc
650       rg2 = rg*rg
651       ww  =(xmdot*xll)/(2.*pi*r2*alpha)*cc/rg
652       wwtrue = ww
653       t1=1.e4
654       t2=1.e30
655 \textcolor{comment}{c100   continue}
656 \textcolor{comment}{c ---------------------------------------}
657 \textcolor{comment}{c      te=1.e6}
658       \textcolor{keywordflow}{do} 1 iss=1,10
659       te = sqrt(t1*t2)
660       wweps = 1.e-6
661 \textcolor{comment}{cc      print *,"TE=",te}
662       pd  =  rmu*te
663       hh  =  sqrt(2.*xnpl1*pd)/ok/cc
664       pr  =  ww/(2.*ainp1*hh)/rg
665       de  =  pr/pd
666       vr  =  xmdot/(4.*pi*r*ain*de*hh)/(cc*rg2)
667       demn   = ain*de
668       temn   = 2*te/3.0
669       xkff   = xkkr*demn*(temn**(-3.5))
670       tauff  = xkff*de*hh*rg
671       taues  = xkes*de*hh*rg
672       tau    = taues+tauff
673       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
674       taup   = qbr/(8.*aa*cc*(te**4))
675       wwfalse= -8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)
676      *        /(alpha*r*dokdr)*(rg/cc)
677       te4=-ww*(1.5*tau+sqrt(3.)+1./taup)*(alpha*r*dokdr)/(8.*aa)
678      *                                              /(rg/cc)
679 \textcolor{comment}{cc      wwfalse=-8.*AA*(TE**4)*TAUP/(ALPHA*R*DOKDR)*(RG/CC)}
680 \textcolor{comment}{cc      te4=-ww/TAUP*(ALPHA*R*DOKDR)/(8.*AA)/(RG/CC)}
681       te=te4**0.25
682       \textcolor{keywordflow}{if} (wwfalse.gt.wwtrue) t1=te
683       \textcolor{keywordflow}{if} (wwfalse.lt.wwtrue) t2=te
684       \textcolor{keywordflow}{if} (abs(wwfalse-wwtrue)/wwtrue.lt.wweps) \textcolor{keywordflow}{goto} 100
685 \textcolor{comment}{c      if (abs(wwfalse-wwtrue).ge.1.e4) goto 100}
686 1     \textcolor{keywordflow}{continue}
687 \textcolor{comment}{C --------------------------------------------}
688 100   \textcolor{keywordflow}{continue}
689       eta = ain*de*vr*vr/(ainp1*pr)*cc*cc
690       dl=0.
691       ss  = 2*ain*de*hh*rg
692 \textcolor{comment}{C -----------------------------}
693 \textcolor{comment}{c      if (imore.eq.2) print *,"PR=",pr," HH=",hh," WW=",ww}
694 \textcolor{comment}{c      if (imore.eq.2) WRITE (6,400) DE,VR,DL,TE,SS}
695       demn   = ain*de
696       temn   = 2*te/3.0
697       xkff   = xkkr*demn*(temn**(-3.5))
698       tauff  = xkff*de*hh*rg
699       taues  = xkes*de*hh*rg
700       tau    = taues+tauff
701       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
702       taup   = qbr/(8.*aa*cc*(te**4))
703       taueff = sqrt(taup*(tau+2./sqrt(3.)))
704       beta=1.
705 \textcolor{comment}{c      t1=tau+2./sqrt(3.)}
706 \textcolor{comment}{c      t2=1./taup}
707 \textcolor{comment}{c      if (t1.ge.t2) then}
708 \textcolor{comment}{c         taueff=1.}
709 \textcolor{comment}{c      else}
710 \textcolor{comment}{c         taueff=2.}
711 \textcolor{comment}{c      endif}
712 \textcolor{comment}{c      WRITE(6,1000) TIME,SS,TE,XMD,taueff,tau,taup}
713 \textcolor{comment}{cc      WRITE(6,1010) JX,R,BETA,TAUEFF,TE,SS,XMD}
714 400   \textcolor{keyword}{FORMAT} (/1h ,\textcolor{stringliteral}{'***** STANDARD MODEL *****'}//1h ,\textcolor{stringliteral}{'DE   ='},1pe15.7,
715      *            5x,\textcolor{stringliteral}{'VR   ='},1pe15.7,5x,\textcolor{stringliteral}{'DL   ='},1pe15.7/1h ,\textcolor{stringliteral}{'TE   ='},
716      *               1pe15.7,5x,\textcolor{stringliteral}{'SS  ='},1pe15.7//)
717 1000  \textcolor{keyword}{FORMAT} (20(1pe12.4))
718 1010  \textcolor{keyword}{FORMAT} (i5,20(1pe12.4))
719 \textcolor{comment}{C}
720 \textcolor{comment}{C}
721       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=270pt]{accdisk_8f_acd7a8d59350daf4880565b6bd3604312_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a13067349a76bff208061d738395a4a9c}{}\index{accdisk.\+f@{accdisk.\+f}!sadmn2@{sadmn2}}
\index{sadmn2@{sadmn2}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{sadmn2(\+R, E\+T\+A, D\+L, D\+E, V\+X, V\+P, T\+E)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine sadmn2 (
\begin{DoxyParamCaption}
\item[{}]{R, }
\item[{}]{E\+T\+A, }
\item[{}]{D\+L, }
\item[{}]{D\+E, }
\item[{}]{V\+X, }
\item[{}]{V\+P, }
\item[{}]{T\+E}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a13067349a76bff208061d738395a4a9c}


Definition at line 725 of file accdisk.\+f.


\begin{DoxyCode}
725 \textcolor{comment}{C******************************************}
726 \textcolor{comment}{c     for optically thin accretion disk}
727 \textcolor{comment}{C}
728       include \textcolor{stringliteral}{'para.h'}
729 \textcolor{comment}{C}
730       rm1 = r-1.
731       r2  = r*r
732       r3  = r2*r
733       ok  =(r/rm1)*sqrt(.5/r3)
734       vk  = r*ok
735       xlk = r*vk
736       xll = xlk-xlin
737       dlnok =-1./rm1-.5/r
738       dokdr = ok*dlnok
739       cc2 = cc*cc
740       rg2 = rg*rg
741       ww  =(xmdot*xll)/(2.*pi*r2*alpha)*cc/rg
742       wwtrue = ww
743       t1=1.e4
744       t2=1.e30
745 \textcolor{comment}{c100   continue}
746 \textcolor{comment}{c ---------------------------------------}
747 \textcolor{comment}{c      te=1.e6}
748       \textcolor{keywordflow}{do} 1 iss=1,10
749       te = sqrt(t1*t2)
750       wweps = 1.e-6
751 \textcolor{comment}{cc      print *,"TE=",te}
752       pd  =  rmu*te
753       hh  =  sqrt(2.*xnpl1*pd)/ok/cc
754       pr  =  ww/(2.*ainp1*hh)/rg
755       de  =  pr/pd
756       vr  =  xmdot/(4.*pi*r*ain*de*hh)/(cc*rg2)
757       demn   = ain*de
758       temn   = 2*te/3.0
759       xkff   = xkkr*demn*(temn**(-3.5))
760       tauff  = xkff*de*hh*rg
761       taues  = xkes*de*hh*rg
762       tau    = taues+tauff
763       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
764       taup   = qbr/(8.*aa*cc*(te**4))
765       wwfalse= -8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)
766      *        /(alpha*r*dokdr)*(rg/cc)
767       te4=-ww*(1.5*tau+sqrt(3.)+1./taup)*(alpha*r*dokdr)/(8.*aa)
768      *                                              /(rg/cc)
769 \textcolor{comment}{cc      wwfalse=-8.*AA*(TE**4)*TAUP/(ALPHA*R*DOKDR)*(RG/CC)}
770 \textcolor{comment}{cc      te4=-ww/TAUP*(ALPHA*R*DOKDR)/(8.*AA)/(RG/CC)}
771       te=te4**0.25
772       \textcolor{keywordflow}{if} (wwfalse.gt.wwtrue) t1=te
773       \textcolor{keywordflow}{if} (wwfalse.lt.wwtrue) t2=te
774       \textcolor{keywordflow}{if} (abs(wwfalse-wwtrue)/wwtrue.lt.wweps) \textcolor{keywordflow}{goto} 100
775 \textcolor{comment}{c      if (abs(wwfalse-wwtrue).ge.1.e4) goto 100}
776 1     \textcolor{keywordflow}{continue}
777 \textcolor{comment}{C --------------------------------------------}
778 100   \textcolor{keywordflow}{continue}
779       eta = ain*de*vr*vr/(ainp1*pr)*cc*cc
780       dl  = 0.
781       ss  = 2*ain*de*hh*rg
782 \textcolor{comment}{C -----------------------------}
783 \textcolor{comment}{c      if (imore.eq.2) print *,"PR=",pr," HH=",hh," WW=",ww}
784 \textcolor{comment}{c      if (imore.eq.2) WRITE (6,400) DE,VR,DL,TE,SS}
785       demn   = ain*de
786       temn   = 2*te/3.0
787       xkff   = xkkr*demn*(temn**(-3.5))
788       tauff  = xkff*de*hh*rg
789       taues  = xkes*de*hh*rg
790       tau    = taues+tauff
791       qbr    = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
792       taup   = qbr/(8.*aa*cc*(te**4))
793       taueff = sqrt(taup*(tau+2./sqrt(3.)))
794       beta=1.
795 
796       vx = -vr
797       vp = dl/r
798 \textcolor{comment}{C}
799       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{accdisk_8f_a13067349a76bff208061d738395a4a9c_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a3f131e7e7134cac73da29552317c7af0}{}\index{accdisk.\+f@{accdisk.\+f}!simpr@{simpr}}
\index{simpr@{simpr}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{simpr(y, dydx, dfdx, dfdy, nmax, n, xs, htot, nstep, yout,                                                                                       derivs)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine simpr (
\begin{DoxyParamCaption}
\item[{dimension(n)}]{y, }
\item[{dimension(n)}]{dydx, }
\item[{dimension(n)}]{dfdx, }
\item[{dimension(nmax,nmax)}]{dfdy, }
\item[{integer}]{nmax, }
\item[{integer}]{n, }
\item[{}]{xs, }
\item[{}]{htot, }
\item[{integer}]{nstep, }
\item[{dimension(n)}]{yout, }
\item[{external}]{derivs}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a3f131e7e7134cac73da29552317c7af0}


Definition at line 3064 of file accdisk.\+f.


\begin{DoxyCode}
3064       \textcolor{keywordtype}{implicit} \textcolor{keywordtype}{real*8} (a-h,o-z)
3065       \textcolor{keyword}{common} /lscal/ kpr
3066       \textcolor{keywordtype}{integer} n,nmax,nstep,nmaxx,kpr
3067 \textcolor{comment}{c      real htot,xs,dfdx(n),dfdy(nmax,nmax),dydx(n),y(n),yout(n)}
3068       dimension dfdx(n),dfdy(nmax,nmax),dydx(n),y(n),yout(n)
3069       \textcolor{keywordtype}{external} derivs
3070 \textcolor{comment}{c --- Maximum expected value of n.}
3071       \hyperlink{para_8h_a917ae1b50ccc7039d1bf4d6023818d42}{parameter}(nmaxx=50)
3072       \textcolor{keywordtype}{integer} i,j,nn,indx(nmaxx)
3073 \textcolor{comment}{c      real d,h,x,a(nmaxx,nmaxx),del(nmaxx),ytemp(nmaxx)}
3074       dimension a(nmaxx,nmaxx),del(nmaxx),ytemp(nmaxx)
3075 \textcolor{comment}{c --- Stepsize }
3076       h=htot/nstep
3077 \textcolor{comment}{c --- Set up the matrix 1-hf'.}
3078       \textcolor{keywordflow}{do} 12 i=1,n
3079          \textcolor{keywordflow}{do} 11 j=1,n
3080             a(i,j)=-h*dfdy(i,j)
3081  11      \textcolor{keywordflow}{continue}   
3082          a(i,i)=a(i,i)+1.
3083  12   \textcolor{keywordflow}{continue}
3084 \textcolor{comment}{c --- LU decommposition of the matrix.}
3085       \textcolor{keyword}{call }\hyperlink{accdisk_8f_aca7b6e6ef1458720883a20b4b4184f56}{ludcmp} (a,n,nmaxx,indx,d)
3086 \textcolor{comment}{c --- Set up right hand side for first step. }
3087 \textcolor{comment}{c --- Use yout for temporary storage.}
3088       \textcolor{keywordflow}{do} 13 i=1,n
3089          yout(i)=h*(dydx(i)+h*dfdx(i))
3090  13   \textcolor{keywordflow}{continue}
3091       \textcolor{keyword}{call }\hyperlink{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}{lubksb} (a,n,nmaxx,indx,yout)
3092 \textcolor{comment}{c --- First step.}
3093       \textcolor{keywordflow}{do} 14 i=1,n
3094          del(i)=yout(i)
3095          ytemp(i)=y(i)+del(i)
3096  14   \textcolor{keywordflow}{continue}
3097       x=xs+h
3098 \textcolor{comment}{c --- Use yout for temporary storage of derivatives.}
3099       \textcolor{keyword}{call }derivs(x,ytemp,yout)
3100       \textcolor{keywordflow}{if} (kpr.eq.1) \textcolor{keywordflow}{return}
3101 \textcolor{comment}{c --- General step.}
3102       \textcolor{keywordflow}{do} 17 nn=2,nstep
3103 \textcolor{comment}{c --- set up right hand side for general step.}
3104          \textcolor{keywordflow}{do} 15 i=1,n
3105             yout(i)=h*yout(i)-del(i)
3106  15      \textcolor{keywordflow}{continue}
3107          \textcolor{keyword}{call }\hyperlink{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}{lubksb} (a,n,nmaxx,indx,yout)
3108          \textcolor{keywordflow}{do} 16 i=1,n
3109             del(i)=del(i)+2.*yout(i)
3110             ytemp(i)=ytemp(i)+del(i)
3111  16      \textcolor{keywordflow}{continue}
3112          x=x+h
3113          \textcolor{keyword}{call }derivs (x,ytemp,yout)
3114          \textcolor{keywordflow}{if} (kpr.eq.1) \textcolor{keywordflow}{return}
3115  17   \textcolor{keywordflow}{continue}
3116 \textcolor{comment}{c --- Set up right hand side for last step.}
3117       \textcolor{keywordflow}{do} 18 i=1,n
3118          yout(i)=h*yout(i)-del(i)
3119  18   \textcolor{keywordflow}{continue}
3120       \textcolor{keyword}{call }\hyperlink{accdisk_8f_a275de2797d71a7dfccc587012ceaafad}{lubksb}(a,n,nmaxx,indx,yout)
3121 \textcolor{comment}{c --- take last step.}
3122       \textcolor{keywordflow}{do} 19 i=1,n
3123          yout(i)=ytemp(i)+yout(i)
3124  19   \textcolor{keywordflow}{continue}
3125       kpr=0
3126       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=302pt]{accdisk_8f_a3f131e7e7134cac73da29552317c7af0_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a3f131e7e7134cac73da29552317c7af0_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356}{}\index{accdisk.\+f@{accdisk.\+f}!stifbs@{stifbs}}
\index{stifbs@{stifbs}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{stifbs(y, dydx, nv, x, htry, eps, yscal, hdid, hnext,                                                                                           derivs, icon)}]{\setlength{\rightskip}{0pt plus 5cm}subroutine stifbs (
\begin{DoxyParamCaption}
\item[{dimension(nv)}]{y, }
\item[{dimension(nv)}]{dydx, }
\item[{integer}]{nv, }
\item[{}]{x, }
\item[{}]{htry, }
\item[{}]{eps, }
\item[{dimension(nv)}]{yscal, }
\item[{}]{hdid, }
\item[{}]{hnext, }
\item[{external}]{derivs, }
\item[{}]{icon}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356}


Definition at line 2922 of file accdisk.\+f.


\begin{DoxyCode}
2922       \textcolor{keywordtype}{implicit} \textcolor{keywordtype}{real*8} (a-h,o-z)
2923       \textcolor{keyword}{common} /lscal/ kpr
2924       \textcolor{keywordtype}{integer} nv,nmax,kmaxx,imax,kpr
2925 \textcolor{comment}{c      real eps,hdid,hnext,htry,x,dydx(nv),y(nv),yscal(nv),safe1,}
2926 \textcolor{comment}{c     &     safe2,redmax,redmin,tiny,scalmx}
2927       dimension dydx(nv),y(nv),yscal(nv)
2928       \textcolor{keywordtype}{external} derivs
2929       \hyperlink{para_8h_a917ae1b50ccc7039d1bf4d6023818d42}{parameter}(nmax=50,kmaxx=7,imax=kmaxx+1,safe1=.25,safe2=.7,
2930      &           redmax=1.e-5,redmin=.7,tiny=1.e-30,scalmx=.1)
2931       \textcolor{keywordtype}{integer} i,iq,k,kk,km,kmax,kopt,nvold,nseq(imax)
2932 \textcolor{comment}{c      real eps1,epsold,errmax,fact,h,red,scale,work,wrkmin,xest,xnew,    }
2933 \textcolor{comment}{c     &     a(imax),alf(kmaxx,kmaxx),dfdx(nmax),dfdy(nmax,nmax),}
2934 \textcolor{comment}{c     &     err(kmaxx),yerr(nmax),ysav(nmax),yseq(nmax)}
2935       dimension a(imax),alf(kmaxx,kmaxx),dfdx(nmax),dfdy(nmax,nmax),
2936      &     err(kmaxx),yerr(nmax),ysav(nmax),yseq(nmax)
2937       \textcolor{keywordtype}{logical} first,reduct
2938       \textcolor{keywordtype}{save} a,alf,epsold,first,kmax,kopt,nseq,nvold,xnew
2939       \textcolor{keyword}{data} first/.true./,epsold/-1./,nvold/-1/
2940 \textcolor{comment}{c----- Sequence is different from bsstep.      }
2941       \textcolor{keyword}{data} nseq /2,6,10,14,22,34,50,70/
2942 \textcolor{comment}{c----- Reinitialize also if nv has changed.   }
2943       \textcolor{keywordflow}{if} (eps.ne.epsold.or.nv.ne.nvold) \textcolor{keywordflow}{then}
2944           hnext=-1.e29
2945           xnew=-1.e29
2946           eps1=safe1*eps
2947 \textcolor{comment}{c----- Compute work coefficients A\_k. (NR eq. 16.4.6)     }
2948           a(1)=nseq(1)+1
2949           \textcolor{keywordflow}{do} 11 k=1,kmaxx
2950                 a(k+1)=a(k)+nseq(k+1)
2951  11       \textcolor{keywordflow}{continue}
2952 \textcolor{comment}{c----- Compute alpha(k,q). (NR eq. 16.4.11)}
2953           \textcolor{keywordflow}{do} 13 iq=2,kmaxx
2954                 \textcolor{keywordflow}{do} 12 k=1,iq-1
2955                       alf(k,iq)=eps1**((a(k+1)-a(iq+1))/
2956      &                          ((a(iq+1)-a(1)+1.)*(2*k+1)))
2957  12             \textcolor{keywordflow}{continue}
2958  13       \textcolor{keywordflow}{continue}
2959 \textcolor{comment}{c-----}
2960           epsold=eps
2961           nvold=nv
2962           a(1)=nv+a(1)
2963           \textcolor{keywordflow}{do} 14 k=1,kmaxx
2964                 a(k+1)=a(k)+nseq(k+1)
2965  14       \textcolor{keywordflow}{continue}
2966 \textcolor{comment}{c----- Determine optimal row number for convergence. }
2967           \textcolor{keywordflow}{do} 15 kopt=2,kmaxx-1
2968                 \textcolor{keywordflow}{if} (a(kopt+1).gt.a(kopt)*alf(kopt-1,kopt)) \textcolor{keywordflow}{goto} 1
2969  15       \textcolor{keywordflow}{continue}
2970  1        kmax=kopt
2971 \textcolor{keywordflow}{      endif}
2972       h=htry
2973 \textcolor{comment}{c----- Save the starting values. }
2974       \textcolor{keywordflow}{do} 16 i=1,nv
2975             ysav(i)=y(i)
2976  16   \textcolor{keywordflow}{continue}
2977 \textcolor{comment}{c----- Evaluate Jacobian. }
2978       \textcolor{keyword}{call }\hyperlink{accdisk_8f_a5d906cddbc323034b4e8202ea06e5a09}{jac}(x,y,dydx,dfdx,dfdy)
2979       \textcolor{keywordflow}{if} (kpr.eq.1) \textcolor{keywordflow}{return}
2980       \textcolor{keywordflow}{if} (h.ne.hnext.or.x.ne.xnew) \textcolor{keywordflow}{then}
2981           first=.true.
2982           kopt=kmax
2983 \textcolor{keywordflow}{      endif}
2984       reduct=.false.
2985  2    \textcolor{keywordflow}{do} 18 k=1,kmax
2986             xnew=x+h
2987             \textcolor{keywordflow}{if} (xnew.eq.x) \textcolor{keywordflow}{then}
2988                 icon=16000
2989                 \textcolor{keywordflow}{return}
2990 \textcolor{keywordflow}{            endif}
2991             \textcolor{keyword}{call }\hyperlink{accdisk_8f_a3f131e7e7134cac73da29552317c7af0}{simpr} (ysav,dydx,dfdx,dfdy,nmax,nv,x,h,nseq(k),yseq,
2992      &                  derivs)
2993             xest=(h/nseq(k))**2
2994             \textcolor{keyword}{call }\hyperlink{accdisk_8f_a4244cdf354699bb4cb702c3df0bd9b80}{pzextr} (k,xest,yseq,y,yerr,nv)
2995             \textcolor{keywordflow}{if} (k.ne.1) \textcolor{keywordflow}{then}
2996                 errmax=tiny
2997                 \textcolor{keywordflow}{do} 17 i=1,nv
2998                       errmax=max(errmax,abs(yerr(i)/yscal(i)))
2999  17             \textcolor{keywordflow}{continue}
3000                 errmax=errmax/eps
3001                 km=k-1
3002                 err(km)=(errmax/safe1)**(1./(2*km+1))
3003 \textcolor{keywordflow}{            endif}
3004             \textcolor{keywordflow}{if} (k.ne.1.and.(k.ge.kopt-1.or.first)) \textcolor{keywordflow}{then}
3005                 \textcolor{keywordflow}{if} (errmax.lt.1.) \textcolor{keywordflow}{goto} 4
3006                 \textcolor{keywordflow}{if} (k.eq.kmax.or.k.eq.kopt+1) \textcolor{keywordflow}{then}
3007                     red=safe2/err(km)
3008                     \textcolor{keywordflow}{goto} 3
3009                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (k.eq.kopt) \textcolor{keywordflow}{then}
3010                     \textcolor{keywordflow}{if} (alf(kopt-1,kopt).lt.err(km)) \textcolor{keywordflow}{then}
3011                         red=1./err(km)
3012                         \textcolor{keywordflow}{goto} 3
3013 \textcolor{keywordflow}{                    endif}
3014                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (kopt.eq.kmax) \textcolor{keywordflow}{then}
3015                     \textcolor{keywordflow}{if} (alf(km,kmax-1).lt.err(km)) \textcolor{keywordflow}{then}
3016                         red=alf(km,kmax-1)*safe2/err(km)
3017                         \textcolor{keywordflow}{goto} 3
3018 \textcolor{keywordflow}{                    endif}
3019                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (alf(km,kopt).lt.err(km)) \textcolor{keywordflow}{then}
3020                     red=alf(km,kopt-1)/err(km)
3021                     \textcolor{keywordflow}{goto} 3
3022 \textcolor{keywordflow}{                endif}
3023 \textcolor{keywordflow}{            endif}
3024  18   \textcolor{keywordflow}{continue}
3025 \textcolor{comment}{c----- Reduce stepsize by at least REDMIN and at most REDMAX.}
3026  3    red=min(red,redmin)
3027       red=max(red,redmax)
3028       h=h*red
3029       reduct=.true.
3030 \textcolor{comment}{c----- Try again! }
3031       \textcolor{keywordflow}{goto} 2
3032 \textcolor{comment}{c----- Successful step taken. }
3033  4    x=xnew
3034       hdid=h
3035       first=.false.
3036 \textcolor{comment}{c----- Compute optimalrow for convergence and corresponding stepsize.  }
3037       wrkmin=1.e35
3038       \textcolor{keywordflow}{do} 19 kk=1,km
3039          fact=max(err(kk),scalmx)
3040          work=fact*a(kk+1)
3041          \textcolor{keywordflow}{if} (work.lt.wrkmin) \textcolor{keywordflow}{then}
3042              scale=fact
3043              wrkmin=work
3044              kopt=kk+1
3045 \textcolor{keywordflow}{         endif}
3046  19   \textcolor{keywordflow}{continue}
3047       hnext=h/scale
3048 \textcolor{comment}{c --- Check for possible order increase, but not if stepsize was just reduced. }
3049       \textcolor{keywordflow}{if} (kopt.ge.k.and.kopt.ne.kmax.and..not.reduct) \textcolor{keywordflow}{then}
3050           fact=max(scale/alf(kopt-1,kopt),scalmx)
3051           \textcolor{keywordflow}{if} (a(kopt+1)*fact.le.wrkmin) \textcolor{keywordflow}{then}
3052               hnext=h/fact
3053               kopt=kopt+1
3054 \textcolor{keywordflow}{          endif}
3055 \textcolor{keywordflow}{      endif}
3056       icon=10
3057       \textcolor{keywordflow}{return}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=337pt]{accdisk_8f_a5da5beac1d65475a8a0d3aa1c3a79356_icgraph}
\end{center}
\end{figure}


\hypertarget{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{}\index{accdisk.\+f@{accdisk.\+f}!temp@{temp}}
\index{temp@{temp}!accdisk.\+f@{accdisk.\+f}}
\subsubsection[{temp(\+D\+E, P\+R)}]{\setlength{\rightskip}{0pt plus 5cm}double precision function temp (
\begin{DoxyParamCaption}
\item[{}]{D\+E, }
\item[{}]{P\+R}
\end{DoxyParamCaption}
)}\label{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}


Definition at line 1347 of file accdisk.\+f.


\begin{DoxyCode}
1347 \textcolor{comment}{C*********************************************}
1348 \textcolor{comment}{C}
1349       include \textcolor{stringliteral}{'para.h'}
1350 \textcolor{comment}{C}
1351 \textcolor{comment}{c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1352 \textcolor{comment}{c     A1    : 3/a*(RMU*rho0)}
1353 \textcolor{comment}{c     A2    : -3/a*P0 (=T0^4)}
1354 \textcolor{comment}{c     TMAX  : Temperature for Ptotal=Prad (P0=a/3*T0^4)  }
1355 \textcolor{comment}{c     TMIN  : 0.}
1356 \textcolor{comment}{c}
1357 \textcolor{comment}{c     FX    : TMAX^4 + A1*TMAX + A2 == 3/a*(Prad + Pgas - Ptotal) > 0}
1358 \textcolor{comment}{c     FN    : TMIN^4 + A1*TMIN + A2 ==                            < 0}
1359 \textcolor{comment}{c}
1360 \textcolor{comment}{c     TH    : Mean Temperature}
1361 \textcolor{comment}{c     FH    : TH^4 + A1*TH + A2 ==> Basically, this quantity = 0 !}
1362 \textcolor{comment}{c}
1363 \textcolor{comment}{c           if T > Treal -> F(T) > 0 }
1364 \textcolor{comment}{c           if T < Treal -> F(T) < 0}
1365 \textcolor{comment}{c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1366       a1  = 3.*rmu*de/aa
1367       a2  =-3.*pr/aa
1368       eps = 1.0e-12
1369 \textcolor{comment}{c      eps = 1.0e-10}
1370       tmax= (-a2)**0.25
1371       tmin= 0.
1372       fx  = tmax**4+a1*tmax+a2
1373       fn  = tmin**4+a1*tmin+a2
1374       \textcolor{keywordflow}{DO} 40 itr=1,10
1375          th  = 0.5*(tmax+tmin)
1376          fh  = th**4+a1*th+a2
1377 \textcolor{comment}{c}
1378          \textcolor{keywordflow}{IF} (fh*fn .LT. 0.) tmax=th
1379          \textcolor{keywordflow}{IF} (fh*fn .LT. 0.) fx=fh
1380 \textcolor{comment}{c     }
1381          \textcolor{keywordflow}{IF} (fh*fx .LT. 0.) tmin=th
1382          \textcolor{keywordflow}{IF} (fh*fx .LT. 0.) fn=fh
1383  40   \textcolor{keywordflow}{CONTINUE}
1384 \textcolor{comment}{C}
1385       xxx = th
1386 \textcolor{comment}{C}
1387 \textcolor{comment}{c +++++ For obtain the solutiono of TEMPERATURE using Newton Method ++++}
1388 \textcolor{comment}{c}
1389 \textcolor{comment}{c     xxx : Rough solution of TE}
1390 \textcolor{comment}{c     xx1 : Better solution of TE}
1391 \textcolor{comment}{c                 d(Prad+Pgas)}
1392 \textcolor{comment}{c     xx1 = xxx - ------------    }
1393 \textcolor{comment}{c                     dT}
1394 \textcolor{comment}{c     TEMP: Final solution of TE}
1395 \textcolor{comment}{c     }
1396       \textcolor{keywordflow}{DO} 100 itr=1,20
1397          xx1 = xxx-(xxx**4+a1*xxx+a2)/(4.*xxx**3+a1)
1398          \textcolor{keywordflow}{IF} (abs((xx1-xxx)/xx1) .LT. eps) \textcolor{keywordflow}{GO TO} 120
1399          xxx = xx1
1400  100  \textcolor{keywordflow}{CONTINUE}
1401 \textcolor{comment}{c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
1402 \textcolor{comment}{c}
1403 \textcolor{comment}{c +++++ For not converge ! +++++}
1404       \textcolor{keyword}{WRITE} (6,110)
1405       \hyperlink{accdisk_8f_a5bb037d0b8e89bb4b97047490740a435}{print} *,de,pr,tmax,tmin,fx,fn,th,fh,xxx,xx1
1406 110   \textcolor{keyword}{FORMAT} (1h ,\textcolor{stringliteral}{'LOOP COUNT (TEMP) IS OVER MAXIMUM'})
1407       stop
1408 \textcolor{comment}{c ++++++++++++++++++++++++++++++}
1409 \textcolor{comment}{c}
1410 120   \textcolor{keywordflow}{CONTINUE}
1411 \textcolor{comment}{c}
1412       \hyperlink{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4}{temp}=xx1
1413 \textcolor{comment}{C}
1414       \textcolor{keywordflow}{RETURN}
\end{DoxyCode}


Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{accdisk_8f_a666f2c0474d3a998e897a13dbfa872c4_icgraph}
\end{center}
\end{figure}


