From a4e96b975801a9a2497c6be95e5216eb03e3b09e Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Fri, 3 Nov 2023 12:03:35 +0100
Subject: [PATCH] Add docstrings for all code elements.

---
 src/include/Commons.h  | 30 +++++++++++++++++++++++++++++-
 src/include/sph_subs.h | 12 ++++++------
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/src/include/Commons.h b/src/include/Commons.h
index 3d176820..088dcc74 100644
--- a/src/include/Commons.h
+++ b/src/include/Commons.h
@@ -43,25 +43,45 @@ protected:
 	//! \brief NLMMT. QUESTION: definition?
 	int nlmmt;
 public:
+	//! \brief QUESTION: definition?
 	std::complex<double> **rmi;
+	//! \brief QUESTION: definition?
 	std::complex<double> **rei;
+	//! \brief QUESTION: definition?
 	std::complex<double> **w;
+	//! \brief QUESTION: definition?
 	std::complex<double> *fsas;
+	//! \brief QUESTION: definition?
 	std::complex<double> **vints;
+	//! \brief QUESTION: definition?
 	double *sscs;
+	//! \brief QUESTION: definition?
 	double *sexs;
+	//! \brief QUESTION: definition?
 	double *sabs;
+	//! \brief QUESTION: definition?
 	double *sqscs;
+	//! \brief QUESTION: definition?
 	double *sqexs;
+	//! \brief QUESTION: definition?
 	double *sqabs;
+	//! \brief QUESTION: definition?
 	double *gcsv;
+	//! \brief Vector of sphere X coordinates.
 	double *rxx;
+	//! \brief Vector of sphere X coordinates.
 	double *ryy;
+	//! \brief Vector of sphere X coordinates.
 	double *rzz;
+	//! \brief Vector of sphere radii.
 	double *ros;
+	//! \brief Matrix of spherical layer break radii. QUESTION: correct?
 	double **rc;
+	//! \brief Vector of spherical component identifiers.
 	int *iog;
+	//! \brief Vector of numbers of spherical layers.
 	int *nshl;
+	//! \brief QUESTION: definition?
 	std::complex<double> ***sas;
 
 	/*! \brief C1 instance constructor.
@@ -79,12 +99,20 @@ public:
  *
  */
 class C2 {
-	int nsph, nhspo;
+	//! \brief Number of spheres.
+	int nsph;
+	//! \brief Number of required orders.
+	int nhspo;
 public:
+	//! \brief QUESTION: definition?
 	std::complex<double> *ris;
+	//! \brief QUESTION: definition?
 	std::complex<double> *dlri;
+	//! \brief QUESTION: definition?
 	std::complex<double> *dc0;
+	//! \brief QUESTION: definition?
 	std::complex<double> *vkt;
+	//! Vector of scaled sizes. QUESTION: correct?
 	double *vsz;
 
 	/*! \brief C2 instance constructor.
diff --git a/src/include/sph_subs.h b/src/include/sph_subs.h
index d379701b..c01d90d7 100644
--- a/src/include/sph_subs.h
+++ b/src/include/sph_subs.h
@@ -30,7 +30,7 @@ std::complex<double> dconjg(std::complex<double> z) {
 
 /*! \brief C++ porting of CG1
  *
- * \param li: `int`
+ * \param lmpml: `int`
  * \param mu: `int`
  * \param l: `int`
  * \param m: `int`
@@ -520,10 +520,10 @@ void pwma(
  * \param li: `int`
  * \param nsph: `int`
  * \param c1: `C1 *`
- * \param TQSE: Matrix of complex.
- * \param TQSPE: Matrix of complex.
- * \param TQSS: Matrix of complex.
- * \param TQSPS: Matrix of complex.
+ * \param tqse: Matrix of complex.
+ * \param tqspe: Matrix of complex.
+ * \param tqss: Matrix of complex.
+ * \param tqsps: Matrix of complex.
  */
 void rabas(
 			int inpol, int li, int nsph, C1 *c1, double **tqse, std::complex<double> **tqspe,
@@ -770,7 +770,7 @@ void rkt(
  * \param n: `int`
  * \param x: `double`
  * \param nm: `int &`
- * \param sj: `double[]`
+ * \param sy: `double[]`
  */
 void rnf(int n, double x, int &nm, double sy[]) {
 	/*
-- 
GitLab