summaryrefslogtreecommitdiff
path: root/src/brill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/brill.c')
-rw-r--r--src/brill.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/brill.c b/src/brill.c
index b48980d..cc45587 100644
--- a/src/brill.c
+++ b/src/brill.c
@@ -45,7 +45,7 @@ typedef struct BasisSet {
/*
* The basis of even (n = 2 * idx) SB functions (Boyd 2000, Ch 17.9)
* SB(x, n) = sin((n + 1) arccot(|x| / L))
- * They are symmetric wrt beginning and decay as 1/x in infinity.
+ * They are symmetric wrt origin and decay as 1/x in infinity.
*/
static CCTK_REAL scale_factor;
@@ -232,10 +232,16 @@ static int solve_svd(gsl_matrix *mat, gsl_vector **px, gsl_vector **prhs)
return 0;
}
-/* solve the equation
+/*
+ * Solve the equation
* Δψ + ¼ ψ (∂²q/∂r² + ∂²q/∂z²) = 0
* for the coefficients of spectral approximation of ψ:
- * ψ(r, z) = ΣaᵢⱼTᵢ(r)Tⱼ(z)
+ * ψ(r, z) = 1 + ΣaᵢⱼTᵢ(r)Tⱼ(z)
+ * where i = { 0, ... , bd->nb_coeffs_x };
+ * j = { 0, ... , bd->nb_coeffs_z };
+ * q(r, z) and Tᵢ(x) are defined by bd->q_func, bd->laplace_q_func and
+ * bd->basis.
+ *
* The cofficients are exported in bd->psi_coeffs
*/
static int brill_solve(BrillDataContext *bd)
@@ -283,6 +289,7 @@ static int brill_solve(BrillDataContext *bd)
else
ret = solve_linear(mat, &coeffs, &rhs);
+ /* export the result to the caller */
bd->psi_coeffs = coeffs;
#if ACC_TEST