From 5cc29210d72b5191ee7ae159a310aebcf91eb382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 23 Jan 2020 00:23:33 +0200 Subject: [PATCH] =?UTF-8?q?Jdu=20sp=C3=A1t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: e253bb5068bdb4ad8ccef9879dadb8e1463a8968 --- qpms/scatsys_translation_booster.c | 6 ++++++ qpms/scatsystem.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/qpms/scatsys_translation_booster.c b/qpms/scatsys_translation_booster.c index d2668f3..489590b 100644 --- a/qpms/scatsys_translation_booster.c +++ b/qpms/scatsys_translation_booster.c @@ -137,4 +137,10 @@ static qpms_errno_t qpms_scatsys_translation_booster_eval_bessels( return QPMS_SUCCESS; } +typedef struct qpms_scatsysw_translation_booster { + // _Bool owned_by_ssw; // if False, this is not deallocated by parent ssw + const booster_t *b; + complex double *bessels; +} boosterw_t; + diff --git a/qpms/scatsystem.h b/qpms/scatsystem.h index 5771e10..98e04fa 100644 --- a/qpms/scatsystem.h +++ b/qpms/scatsystem.h @@ -206,6 +206,9 @@ static inline const qpms_vswf_set_spec_t *qpms_ss_bspec_pi(const qpms_scatsys_t return ss->tmg[ss->tm[ss->p[pi].tmatrix_id].tmgi].spec; } +struct qpms_scatsysw_translation_booster; +void qpms_scatsysw_translation_booster_free(struct qpms_scatsysw_translation_booster *); + typedef struct qpms_scatsys_at_omega_t { const qpms_scatsys_t *ss; ///< Parent scattering system. /// T-matrices from \a ss, evaluated at \a omega. @@ -216,6 +219,8 @@ typedef struct qpms_scatsys_at_omega_t { complex double omega; ///< Angular frequency qpms_epsmu_t medium; ///< Background medium optical properties at the given frequency complex double wavenumber; ///< Background medium wavenumber + + struct qpms_scatsysw_translation_booster *translation_cache; ///< (private) cache to speedup tranlations } qpms_scatsys_at_omega_t; /// Creates a new scatsys by applying a symmetry group onto a "proto-scatsys", copying particles if needed.