1#ifndef APPARENT_HORIZON_FINDER_HARMONICS_H_
2#define APPARENT_HORIZON_FINDER_HARMONICS_H_
34std::pair<std::vector<double>, std::vector<double>>
GaussLegendre(
int n);
106 std::vector<std::pair<int, int>>
modes;
112 std::vector<double>
Y;
120 std::size_t
point, std::size_t mode)
const {
136 std::vector<double>
h;
149 const std::vector<double>& coefficients);
157 const std::vector<double>& field);
SpectralBasis BuildSpectralBasis(int lmax, int nSigma=-1, int nRho=-1)
Construct a SpectralBasis for the given lmax.
std::vector< double > SphereCoefficients(const SpectralBasis &basis, double radius)
Coefficient vector for a coordinate sphere h = radius (only a_00 != 0, since Y_00 = 1/sqrt(4 pi) so a...
std::vector< std::pair< int, int > > EnumerateModes(int lmax)
Ordered list of (l, m) modes, l = 0..lmax, m = -l..l.
SynthesizedField Synthesize(const SpectralBasis &basis, const std::vector< double > &coefficients)
Synthesis (coefficients -> point values): h = Y a, hRho = Yrho a, etc.
std::pair< std::vector< double >, std::vector< double > > GaussLegendre(int n)
Gauss-Legendre nodes and weights on [-1, 1] (integrates d mu).
ModeValues EvalMode(int l, int m, double rho, double sigma)
Evaluate the real Y_lm and its rho/sigma derivatives at (rho, sigma).
std::vector< double > Project(const SpectralBasis &basis, const std::vector< double > &field)
Analysis (point values -> coefficients): a = Y^T (weight .
double EvalModeValue(int l, int m, double rho, double sigma)
The real Y_lm at (rho, sigma), without any derivatives.
Y_lm and its first/second rho- and sigma-derivatives at one (rho, sigma).
Spectral basis plus collocation grid and precomputed design matrices.
std::vector< double > Ysigma
std::vector< double > weight
std::vector< double > Yrhorho
std::vector< double > Yrho
std::vector< double > Yrhosigma
double designMatrixValue(const std::vector< double > &matrix, std::size_t point, std::size_t mode) const
std::vector< std::pair< int, int > > modes
std::vector< double > rho
std::vector< double > sigma
std::vector< double > Ysigmasigma
h and its angular derivatives at every collocation point (each (nPoints,)).
std::vector< double > hRhoRho
std::vector< double > hRho
std::vector< double > hSigma
std::vector< double > hRhoSigma
std::vector< double > hSigmaSigma