diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-12-06 17:35:57 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-12-06 17:35:57 +0000 |
commit | 7b57fd4cc6dfa45c59fdee119b14708fad2de426 (patch) | |
tree | b11823227bd2bf2ecd5deeebdbf8a2c4cf1a2cfd | |
parent | 708e59c9ca0e0d18d1618d68b2a5358892b50290 (diff) |
add a new parameter:
#
# To detect some divergence cases faster, we also deem any horizon where
# the infinity-norm of Theta exceeds this parameter, to be "not found".
# The default is effectively "no limit".
#
real max_allowable_Theta \
"max ||Theta||_infinity allowed for any trial surface \
before we give up and say we can't find this horizon"
{
(0.0:* :: "any positive real number"
} 1.0e10
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1225 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r-- | doc/documentation.tex | 22 | ||||
-rw-r--r-- | param.ccl | 13 | ||||
-rw-r--r-- | src/driver/Newton.cc | 10 | ||||
-rw-r--r-- | src/driver/driver.hh | 1 | ||||
-rw-r--r-- | src/driver/setup.cc | 1 |
5 files changed, 44 insertions, 3 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex index d04fb72..335e900 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -1235,20 +1235,36 @@ each time that apparent horizon is found: \item[\code{max\_allowable\_horizon\_radius[}$n$\code{]}] \mbox{}\\ This parameter gives the maximum mean-coordinate-radius - which any given apparent horizon may have.%%% + which any given trial surface may have in the course of + trying to solve the apparent horizon equation.%%% \footnote{%%% Note that this is an unweighted arithmetic mean over the horizon-surface grid points, the same value which is printed as \code{r\_grid} during the horizon-finding iterations. }%%% -{} This defaults to $10^{10}$ (effectively $+\infty$) for - each apparent horizon. You can set it to a smaller value +{} In particular, if any trial surface has a mean coordinate radius + which exceeds this parameter, \thorn{AHFinderDirect} gives up + and deems this apparent horizon to be ``not found''. + + This parameter defaults to $10^{10}$ (effectively $+\infty$) + for each apparent horizon. You can set it to a smaller value to make \thorn{AHFinderDirect} a bit more efficient, or (probably more important in practice) to stop \thorn{AHFinderDirect} from iterating off the edge of the grid if this causes problems with interpolation or boundary conditions. +\item[\code{max\_allowable\_Theta}] +\mbox{}\\ + This parameter gives the maximum $\|\Theta\|_\infty$ + which any given trial surface may have in the course of + trying to solve the apparent horizon equation. + In particular, if any trial surface has $\|\Theta\|_\infty$ + exceeding this parameter, \thorn{AHFinderDirect} gives up + and deems this apparent horizon to be ``not found''. + This parameter defaults to $10^{10}$ (effectively $+\infty$) + for each apparent horizon. + \item[\code{surface\_expansion[}$n$\code{]}] \mbox{}\\ This parameter (which defaults to 0.0) sets the expansion @@ -778,6 +778,19 @@ real Theta_norm_for_convergence \ (0.0:* :: "any positive real number" } 1.0e-8 +# +# To detect some divergence cases faster, we also deem any horizon where +# the infinity-norm of Theta exceeds this parameter, to be "not found". +# The default is effectively "no limit". +# +real max_allowable_Theta \ + "max ||Theta||_infinity allowed for any trial surface \ + before we give up and say we can't find this horizon" +{ +(0.0:* :: "any positive real number" +} 1.0e10 + + ################################################################################ # diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc index ae56acb..d400b6d 100644 --- a/src/driver/Newton.cc +++ b/src/driver/Newton.cc @@ -244,6 +244,15 @@ if (hs.has_genuine_horizons()) // + // see if the expansion is too big + // (if so, we'll give up on this horizon) + // + const bool expansion_is_too_large + = norms_are_ok && (Theta_norms.infinity_norm() + > solver_info.max_allowable_Theta); + + + // // compute the mean horizon radius, and if it's too large, // then pretend expansion() returned a "surface too large" error status // @@ -270,6 +279,7 @@ if (hs.has_genuine_horizons()) const bool this_horizon_needs_more_iterations = horizon_is_genuine && Theta_is_ok && !found_this_horizon + && !expansion_is_too_large && !horizon_is_too_large && (iteration < max_iterations); diff --git a/src/driver/driver.hh b/src/driver/driver.hh index 71cb488..b08a551 100644 --- a/src/driver/driver.hh +++ b/src/driver/driver.hh @@ -118,6 +118,7 @@ struct solver_info max_Newton_iterations__subsequent; fp max_allowable_Delta_h_over_h; fp Theta_norm_for_convergence; + fp max_allowable_Theta; fp *max_allowable_horizon_radius; // --> new[]-allocated array // of size N_horizons+1 , // subscripted by hn diff --git a/src/driver/setup.cc b/src/driver/setup.cc index fc8fdee..445e3f8 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -238,6 +238,7 @@ solver_info.max_Newton_iterations__subsequent = max_Newton_iterations__subsequent; solver_info.max_allowable_Delta_h_over_h = max_allowable_Delta_h_over_h; solver_info.Theta_norm_for_convergence = Theta_norm_for_convergence; +solver_info.max_allowable_Theta = max_allowable_Theta; // ... horizon numbers run from 1 to N_horizons inclusive // so the array size is N_horizons+1 solver_info.max_allowable_horizon_radius = new double[state.N_horizons+1]; |