Function
NumCosmoMathSpectralcompute_d2_row
Declaration [src]
void
ncm_spectral_compute_d2_row (
gdouble* row_data,
glong k,
glong offset,
gdouble coeff
)
Description [src]
Computes row k of the second derivative operator $\frac{d^2}{dx^2}$ that maps Chebyshev coefficients to Gegenbauer $C^{(2)}_k$ coefficients.
Input: Chebyshev $T_n(x)$ basis coefficients (columns) Output: $\langle C^{(2)}_k, f” \rangle$ - projection of $f”$ (row k)
Mathematical formula: $$ \langle C^{(2)}k, f” \rangle = 2(k+2) c{k+2} $$ where $c_n$ are the input Chebyshev coefficients.
Adds to existing row data (for linear combinations of operators).
Matrix entries for row k: - column k+2: coeff * 2*(k+2) (single non-zero entry).