From e2722bc866bdd9e8db7b4b652079db654554d11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 25 Feb 2019 18:54:59 +0200 Subject: [PATCH] Move typedef qpms_vswf_set_spec_t to qpms_types.h Former-commit-id: c81924f51823c999d91acf005e27105e16f96177 --- qpms/qpms_types.h | 20 ++++++++++++++++++++ qpms/scatsystem.h | 2 +- qpms/symmetries.h | 1 - qpms/vswf.h | 19 +------------------ 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/qpms/qpms_types.h b/qpms/qpms_types.h index 6d34e46..98bd7d1 100644 --- a/qpms/qpms_types.h +++ b/qpms/qpms_types.h @@ -280,6 +280,26 @@ typedef struct qpms_irot3_t { short det; ///< Determinant of the transformation (valid values are 1 (rotation) or -1 (improper rotation) } qpms_irot3_t; +/// Specifies a finite set of VSWFs. +/** + * When for example not all the M and N -type waves up to a degree lMax + * need to be computed, this will specify the subset. + * + * A typical use case would be when only even/odd fields wrt. z-plane + * mirror symmetry are considered. + * + * Check vswf.h for "methods". + */ +typedef struct qpms_vswf_set_spec_t { + size_t n; ///< Actual number of VSWF indices included in ilist. + qpms_uvswfi_t *ilist; ///< List of wave indices. + qpms_l_t lMax; ///< Maximum degree of the waves specified in ilist. + qpms_l_t lMax_M, ///< Maximum degree of the magnetic (M-type) waves. + lMax_N, ///< Maximum degree of the electric (N-type) waves. + lMax_L; ///< Maximum degree of the longitudinal (L-type) waves. + size_t capacity; ///< Allocated capacity of ilist. + qpms_normalisation_t norm; ///< Normalisation convention. To be set manually if needed. +} qpms_vswf_set_spec_t; #define lmcheck(l,m) assert((l) >= 1 && abs(m) <= (l)) #endif // QPMS_TYPES diff --git a/qpms/scatsystem.h b/qpms/scatsystem.h index 2a20bb1..34c32c3 100644 --- a/qpms/scatsystem.h +++ b/qpms/scatsystem.h @@ -3,7 +3,7 @@ */ #ifndef QPMS_SCATSYSTEM_H #define QPMS_SCATSYSTEM_H -#include "vswf.h" +#include "qpms_types.h" #include #include diff --git a/qpms/symmetries.h b/qpms/symmetries.h index 4548ff0..9e4266a 100644 --- a/qpms/symmetries.h +++ b/qpms/symmetries.h @@ -21,7 +21,6 @@ */ #ifndef SYMMETRIES_H #define SYMMETRIES_H -#include "vswf.h" #include "qpms_types.h" #include diff --git a/qpms/vswf.h b/qpms/vswf.h index 79e8bdb..5c74ca0 100644 --- a/qpms/vswf.h +++ b/qpms/vswf.h @@ -10,24 +10,7 @@ #include "qpms_types.h" #include -/// Specifies a finite set of VSWFs. -/** - * When for example not all the M and N -type waves up to a degree lMax - * need to be computed, this will specify the subset. - * - * A typical use case would be when only even/odd fields wrt. z-plane - * mirror symmetry are considered. - */ -typedef struct qpms_vswf_set_spec_t { - size_t n; ///< Actual number of VSWF indices included in ilist. - qpms_uvswfi_t *ilist; ///< List of wave indices. - qpms_l_t lMax; ///< Maximum degree of the waves specified in ilist. - qpms_l_t lMax_M, ///< Maximum degree of the magnetic (M-type) waves. - lMax_N, ///< Maximum degree of the electric (N-type) waves. - lMax_L; ///< Maximum degree of the longitudinal (L-type) waves. - size_t capacity; ///< Allocated capacity of ilist. - qpms_normalisation_t norm; ///< Normalisation convention. To be set manually if needed. -} qpms_vswf_set_spec_t; +// Methods for qpms_vswf_spec_t /// Creates a qpms_vswf_set_spec_t structure with an empty list of wave indices. qpms_vswf_set_spec_t *qpms_vswf_set_spec_init(); /// Appends a VSWF index to a \ref qpms_vswf_set_spec_t, also updating metadata.