SpECTRE  v2025.08.19
intrp::callbacks::FindApparentHorizon< InterpolationTargetTag, Frame > Struct Template Reference

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)
 

Detailed Description

template<typename InterpolationTargetTag, typename Frame>
struct intrp::callbacks::FindApparentHorizon< InterpolationTargetTag, Frame >

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

template <typename DbTags, typename Metavariables>
static void apply(
const db::DataBox<DbTags>& box,
const typename Metavariables::AhA::temporal_id::type& temporal_id) {
A Charm++ chare that caches global data once per Charm++ node.
Definition: GlobalCache.hpp:223

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

template <typename InterpolationTargetTag, typename DbTags,
typename Metavariables, typename TemporalId>
static void apply(db::DataBox<DbTags>& box,
const TemporalId& temporal_id,
const FastFlow::Status failure_reason) {

that is called if the FastFlow iteration or the interpolation has failed.

Uses:

Modifies:

This can be used in InterpolationTargetTag::post_interpolation_callbacks; see intrp::protocols::InterpolationTargetTag for details on InterpolationTargetTag.

Output

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:

  • t = time given by value of temporal_id argument to apply
  • its = current iteration number.
  • R = min and max of residual over all prolonged grid points.
  • |R| = L2 norm of residual, counting only L modes solved for.
  • |R_mesh| = L2 norm of residual over prolonged grid points.
  • r = min and max radius of trial horizon surface.

Difference between |R| and |R_mesh|:

The 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.


The documentation for this struct was generated from the following file: