SpECTRE  v2024.04.12
FastFlow Class Reference

Fast flow method for finding apparent horizons. More...

#include <FastFlow.hpp>

Classes

struct  AbsTol
 
struct  Alpha
 
struct  Beta
 
struct  DivergenceIter
 
struct  DivergenceTol
 
struct  Flow
 
struct  IterInfo
 Holds information about an iteration of the algorithm. More...
 
struct  MaxIts
 
struct  TruncationTol
 

Public Types

enum class  FlowType { Jacobi , Curvature , Fast }
 
enum class  Status {
  SuccessfulIteration = 0 , AbsTol = 1 , TruncationTol = 2 , MaxIts = -1 ,
  NegativeRadius = -2 , DivergenceError = -3 , InterpolationFailure = -4
}
 
using options = tmpl::list< Flow, Alpha, Beta, AbsTol, TruncationTol, DivergenceTol, DivergenceIter, MaxIts >
 

Public Member Functions

 FastFlow (Flow::type flow, Alpha::type alpha, Beta::type beta, AbsTol::type abs_tol, TruncationTol::type trunc_tol, DivergenceTol::type divergence_tol, DivergenceIter::type divergence_iter, MaxIts::type max_its)
 
 FastFlow (const FastFlow &)=default
 
FastFlowoperator= (const FastFlow &)=default
 
 FastFlow (FastFlow &&)=default
 
FastFlowoperator= (FastFlow &&)=default
 
void pup (PUP::er &p)
 
template<typename Frame >
std::pair< Status, IterInfoiterate_horizon_finder (gsl::not_null< ylm::Strahlkorper< Frame > * > current_strahlkorper, const tnsr::II< DataVector, 3, Frame > &upper_spatial_metric, const tnsr::ii< DataVector, 3, Frame > &extrinsic_curvature, const tnsr::Ijj< DataVector, 3, Frame > &christoffel_2nd_kind)
 Evaluate residuals and compute the next iteration. If Status==SuccessfulIteration, then current_strahlkorper is modified and current_iteration() is incremented. Otherwise, we end with success or failure, and neither current_strahlkorper nor current_iteration() is changed.
 
size_t current_iteration () const
 
template<typename Frame >
size_t current_l_mesh (const ylm::Strahlkorper< Frame > &strahlkorper) const
 Given a Strahlkorper defined up to some maximum Y_lm l called l_surface, returns a larger value of l, l_mesh, that is used for evaluating convergence.
 
void reset_for_next_find ()
 Resets the finder.
 

Static Public Attributes

static constexpr Options::String help
 

Friends

bool operator== (const FastFlow &, const FastFlow &)
 

Detailed Description

Fast flow method for finding apparent horizons.

Details

Based on [78].

Member Data Documentation

◆ help

constexpr Options::String FastFlow::help
staticconstexpr
Initial value:
{
"Find a Strahlkorper using a 'fast flow' method.\n"
"Based on Gundlach, PRD 57, 863 (1998).\n"
"Expands the surface in terms of spherical harmonics Y_lm up to a given\n"
"l_surface, and varies the coefficients S_lm where 0<=l<=l_surface to\n"
"minimize the residual of the apparent horizon equation. Also keeps\n"
"another representation of the surface that is expanded up to\n"
"l_mesh > l_surface. Let R_{Y_lm} be the residual computed using the\n"
"surface represented up to l_surface; this residual can in principle be\n"
"lowered to machine roundoff by enough iterations. Let R_{mesh} be the\n"
"residual computed using the surface represented up to l_mesh; this\n"
"residual represents the truncation error, since l_mesh>l_surface and\n"
"since coefficients S_lm with l>l_surface are not modified in the\n"
"iteration.\n\n"
"Convergence is achieved if R_{Y_lm}< TruncationTol*R_{mesh}, or if\n"
"R_{Y_lm}<AbsTol, where TruncationTol and AbsTol are input parameters.\n"
"If instead |R_{mesh}|_i > DivergenceTol * min_{j}(|R_{mesh}|_j) where\n"
"i is the iteration index and j runs from 0 to i-DivergenceIter, then\n"
"FastFlow exits with Status::DivergenceError. Here DivergenceIter and\n"
"DivergenceTol are input parameters."}

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