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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/Newton.cc | 10 | ||||
-rw-r--r-- | src/driver/driver.hh | 1 | ||||
-rw-r--r-- | src/driver/setup.cc | 1 |
3 files changed, 12 insertions, 0 deletions
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]; |