diff --git a/qpms/scatsystem.h b/qpms/scatsystem.h index 16578a6..4b0fb9f 100644 --- a/qpms/scatsystem.h +++ b/qpms/scatsystem.h @@ -124,8 +124,8 @@ typedef struct qpms_ss_particle_orbitinfo { struct qpms_trans_calculator; typedef struct qpms_scatsys_t { - // TODO does bspec belong here? - qpms_tmatrix_t **tm; ///< T-matrices in the system + qpms_qpms_epsmu_generator_t *medium; ///< Optical properties of the background medium. + qpms_abstract_tmatrix_t **tm; ///< T-matrices in the system qpms_ss_tmi_t tm_count; ///< Number of all different T-matrices qpms_ss_tmi_t tm_capacity; ///< Capacity of tm[]. qpms_particle_tid_t *p; ///< Particles. @@ -167,6 +167,8 @@ typedef struct qpms_scatsys_t { struct qpms_trans_calculator *c; } qpms_scatsys_t; +typedef struct qpms_scatsys_at_omega_t { + /// Convenience function to access pi'th particle's bspec. static inline const qpms_vswf_set_spec_t *qpms_ss_bspec_pi(const qpms_scatsys_t *ss, qpms_ss_pi_t pi) { return ss->tm[ss->p[pi].tmatrix_id]->spec; diff --git a/qpms/tmatrices.h b/qpms/tmatrices.h index c208aa0..ba29e48 100644 --- a/qpms/tmatrices.h +++ b/qpms/tmatrices.h @@ -8,6 +8,8 @@ #include "materials.h" #include + + struct qpms_finite_group_t; typedef struct qpms_finite_group_t qpms_finite_group_t; @@ -503,6 +505,25 @@ qpms_errno_t qpms_tmatrix_axialsym_RQ_transposed_fill(complex double *target, ); +/// An "abstract" t-matrix, contains a T-matrix generator instead of actual data. +typedef struct qpms_tmatrix_function_t { + /** \brief VSWF basis specification, NOT owned by qpms_tmatrix_t by default. + * + * Usually not checked for meaningfulness by the functions (methods), + * so the caller should take care that \a spec->ilist does not + * contain any duplicities and that for each wave with order \a m + * there is also one with order \a −m. + */ + const qpms_vswf_set_spec_t *spec; + const qpms_tmatrix_generator_t *gen; ///< A T-matrix generator function. +} qpms_tmatrix_function_t; + +/// A recepy to create another T-matrices from qpms_tmatrix_fuction_t by symmetry operations. +typedef struct qpms_derived_tmatrix_function_t { + const qpms_tmatrix_function_t *t; +} + + #if 0 // Abstract types that describe T-matrix/particle/scatsystem symmetries // To be implemented later. See also the thoughts in the beginning of groups.h.