diff options
author | rhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26> | 2013-03-28 01:48:57 +0000 |
---|---|---|
committer | rhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26> | 2013-03-28 01:48:57 +0000 |
commit | 7964bfddef9723adbbf7b10dd1163a806668127e (patch) | |
tree | c38f60070b127326e192d3ee122c9ea7a570c7b2 | |
parent | 6638461dfcea5c3d0d66d10cca26cfc83d7cd100 (diff) |
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>
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/GRHydro_InitData/trunk@200 ac85fae7-cede-4708-beff-ae01c7fa1c26
-rw-r--r-- | src/GRHydro_BondiM.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/GRHydro_BondiM.c b/src/GRHydro_BondiM.c index 9dc4224..0b2e6f7 100644 --- a/src/GRHydro_BondiM.c +++ b/src/GRHydro_BondiM.c @@ -647,7 +647,7 @@ static int find_bondi_solution( CCTK_REAL r, CCTK_REAL *rho, CCTK_REAL *u, CCTK_ const int ntries = 10000; int itry; - CCTK_REAL rhotmp, rho_guess; + CCTK_REAL rhotmp; CCTK_REAL dr,ur; @@ -662,17 +662,12 @@ static int find_bondi_solution( CCTK_REAL r, CCTK_REAL *rho, CCTK_REAL *u, CCTK_ } 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 @@ static int find_bondi_solution( CCTK_REAL r, CCTK_REAL *rho, CCTK_REAL *u, CCTK_ 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 ) { |