User: rhaas Date: 2013/03/27 08:48 PM
Modified: /trunk/src/ GRHydro_BondiM.c
Log: GRHydro_Init_Data: remove rho_guess from find_bondi_solution
was used to call the newton solver twice with the very same arguments. Not sure what the idea was.
From: Roland Haas rhaas@tapir.caltech.edu
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_BondiM.c Delta lines: +1 -12 =================================================================== --- trunk/src/GRHydro_BondiM.c 2013-03-28 01:48:56 UTC (rev 199) +++ trunk/src/GRHydro_BondiM.c 2013-03-28 01:48:57 UTC (rev 200) @@ -647,7 +647,7 @@ const int ntries = 10000; int itry;
- CCTK_REAL rhotmp, rho_guess; + CCTK_REAL rhotmp; CCTK_REAL dr,ur;
@@ -662,17 +662,12 @@ } else { // rhotmp = (sqrt(Qdot) - 1.) * (gamma_eos - 1.) / ( gamma_eos * K ); - // rho_guess = pow( rhotmp , (1./(gamma_eos - 1.)) ); if(r < rs) { ur = pow(r,-0.5) ; } else { ur = 0.5*pow(r,-1.5) ; } *rho = Mdot / (4.*M_PI * r * r * ur); } }
- // safe guess value for multiple tries - rho_guess = *rho; - - // set global variables needed by residual function: r_sol = r ;
@@ -681,12 +676,6 @@ retval = gnr_bondi( rho, NEWT_DIM_B, bondi_resid);
- // first try guess if failure - if( retval ) { - *rho = rho_guess; - retval = gnr_bondi( rho, NEWT_DIM_B, bondi_resid); - } - // If we were unsure about the guess and solver fails, then creep from known solution to desired point: if( retval ) {
commits@lists.einsteintoolkit.org