1#ifndef APPARENT_HORIZON_FINDER_SPECTRAL_SOLVER_H_
2#define APPARENT_HORIZON_FINDER_SPECTRAL_SOLVER_H_
18using SpectralResidual = std::function<std::vector<double>(
const std::vector<double>&)>;
60 std::vector<double>
h;
93 const std::vector<double>& initialCoefficients,
SpectralNewtonResult SolveSpectralNewton(const SpectralBasis &basis, const SpectralResidual &residual, const std::vector< double > &initialCoefficients, const SpectralNewtonOptions &options={})
Damped Newton-Raphson solve of the spectral apparent-horizon equations R(a) = 0.
std::function< std::vector< double >(const std::vector< double > &)> SpectralResidual
Residual R(a): the spherical-harmonic coefficients of the expansion Theta for a given coefficient vec...
Spectral basis plus collocation grid and precomputed design matrices.
One state of the Newton solver, recorded only when SpectralNewtonOptions::recordIterationHistory is s...
std::vector< double > coefficients
int iteration
0 for the initial guess
double damping
line-search lambda; 1.0 for the initial guess
double residualNormInfinity
std::vector< double > h
synthesised radius at the basis collocation points
Parameters for the damped Newton solve.
bool recordIterationHistory
populate SpectralNewtonResult::iterationHistory
double massScale
effective tolerance = tolerance / massScale
double maxRadiusFactor
runaway cap on max(h) as a multiple of the initial mean radius
double finiteDifferenceStep
relative step for the Jacobian
double tolerance
convergence threshold on ||R||_inf
double maxRelativeExpansionError
Not used by the Newton iteration: the horizon searches (AHSearch) reject a converged surface whose AH...
Outcome of the Newton solver.
std::vector< SpectralNewtonIterate > iterationHistory
Per-iteration record; empty unless SpectralNewtonOptions::recordIterationHistory.
std::vector< double > coefficients
std::vector< double > residualHistory
||R||_inf per iteration