SpECTRE  2021.08.02
intrp::callbacks::FindApparentHorizon< InterpolationTargetTag, Frame > Struct Template Reference

post interpolation callback (see InterpolationTarget) that does a FastFlow iteration and triggers another one until convergence. More...

#include <FindApparentHorizon.hpp>

Public Types

using observation_types = typename InterpolationTargetTag::post_horizon_find_callback::observation_types
 

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) noexcept
 

Detailed Description

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

post interpolation callback (see InterpolationTarget) that does a FastFlow iteration and triggers another one until convergence.

Assumes that InterpolationTargetTag contains an additional struct called post_horizon_find_callback, which has a function

template <typename DbTags, typename Metavariables>
static void apply(const db::DataBox<DbTags>& box,
const typename Metavariables::temporal_id::
type& /*temporal_id*/) noexcept {
A Charm++ chare that caches constant data once per Charm++ node or non-constant data once per Charm++...
Definition: GlobalCache.hpp:280

that is called if the FastFlow iteration has converged, and an additional struct called horizon_find_failure_callback, which has a function

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

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

Uses:

Modifies:

This is an InterpolationTargetTag::post_interpolation_callback; see InterpolationTarget for a description of 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:

  • 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}\) coefficents 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.