WIP abstract t-matrices

Former-commit-id: 8c573ac3a62bf92195246d6eb95f95df240c48a1
This commit is contained in:
Marek Nečada 2019-12-19 13:50:12 +02:00
parent b6e6554323
commit d53f2964f0
2 changed files with 25 additions and 2 deletions

View File

@ -124,8 +124,8 @@ typedef struct qpms_ss_particle_orbitinfo {
struct qpms_trans_calculator; struct qpms_trans_calculator;
typedef struct qpms_scatsys_t { typedef struct qpms_scatsys_t {
// TODO does bspec belong here? qpms_qpms_epsmu_generator_t *medium; ///< Optical properties of the background medium.
qpms_tmatrix_t **tm; ///< T-matrices in the system 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_count; ///< Number of all different T-matrices
qpms_ss_tmi_t tm_capacity; ///< Capacity of tm[]. qpms_ss_tmi_t tm_capacity; ///< Capacity of tm[].
qpms_particle_tid_t *p; ///< Particles. qpms_particle_tid_t *p; ///< Particles.
@ -167,6 +167,8 @@ typedef struct qpms_scatsys_t {
struct qpms_trans_calculator *c; struct qpms_trans_calculator *c;
} qpms_scatsys_t; } qpms_scatsys_t;
typedef struct qpms_scatsys_at_omega_t {
/// Convenience function to access pi'th particle's bspec. /// 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) { 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; return ss->tm[ss->p[pi].tmatrix_id]->spec;

View File

@ -8,6 +8,8 @@
#include "materials.h" #include "materials.h"
#include <stdio.h> #include <stdio.h>
struct qpms_finite_group_t; struct qpms_finite_group_t;
typedef struct qpms_finite_group_t 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 #if 0
// Abstract types that describe T-matrix/particle/scatsystem symmetries // Abstract types that describe T-matrix/particle/scatsystem symmetries
// To be implemented later. See also the thoughts in the beginning of groups.h. // To be implemented later. See also the thoughts in the beginning of groups.h.