|
SpECTRE
v2025.08.19
|
post interpolation callback (see intrp::protocols::PostInterpolationCallback) that does a FastFlow iteration and triggers another one until convergence. More...
#include <FindApparentHorizon.hpp>
Public Types | |
| using | const_global_cache_tags = Parallel::get_const_global_cache_tags_from_actions< typename InterpolationTargetTag::post_horizon_find_callbacks > |
Static Public Member Functions | |
| template<typename DbTags , typename Metavariables , typename TemporalId > | |
| static bool | apply (const gsl::not_null< db::DataBox< DbTags > * > box, const gsl::not_null< Parallel::GlobalCache< Metavariables > * > cache, const TemporalId &temporal_id) |
post interpolation callback (see intrp::protocols::PostInterpolationCallback) that does a FastFlow iteration and triggers another one until convergence.
Assumes that InterpolationTargetTag contains an additional type alias called post_horizon_find_callbacks, which is a list of structs, each of which has a function
that is called if the FastFlow iteration has converged. InterpolationTargetTag also is assumed to contain an additional type alias called horizon_find_failure_callbacks, which is a list of structs, each of which has a function
that is called if the FastFlow iteration or the interpolation has failed.
Uses:
temporal_idModifies:
This can be used in InterpolationTargetTag::post_interpolation_callbacks; see intrp::protocols::InterpolationTargetTag for details on InterpolationTargetTag.
Optionally, a single line of output is printed to stdout either on each iteration (if verbosity > Verbosity::Quiet) or on convergence (if verbosity > Verbosity::Silent). The output consists of the following labels, and values associated with each label:
temporal_id argument to applyThe horizon is represented in a \(Y_{lm}\) expansion up to \(l=l_{\mathrm{surface}}\); the residual |R| represents the failure of that surface to satisfy the apparent horizon equation.
However, at each iteration we also interpolate the horizon surface to a higher resolution ("prolongation"). The prolonged surface includes \(Y_{lm}\) coefficients up to \(l=l_{\mathrm{mesh}}\), where \(l_{\mathrm{mesh}} > l_{\mathrm{surface}}\). The residual computed on this higher-resolution surface is |R_mesh|.
As iterations proceed, |R| should decrease until it reaches numerical roundoff error, because we are varying all the \(Y_{lm}\) coefficients up to \(l=l_{\mathrm{surface}}\) to minimize the residual. However, |R_mesh| should eventually stop decreasing as iterations proceed, hitting a floor that represents the numerical truncation error of the solution.
The convergence criterion looks at both |R| and |R_mesh|: Once |R| is small enough and |R_mesh| has stabilized, it is pointless to keep iterating (even though one could iterate until |R| reaches roundoff).
Problems with convergence of the apparent horizon finder can often be diagnosed by looking at the behavior of |R| and |R_mesh| as a function of iteration.