From b1f96695aee787e8f9693d6258393e15fbb4ee7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sun, 17 Dec 2017 17:07:19 +0000 Subject: [PATCH] Types for vswfs Former-commit-id: d868e91fa47206edc345780c009c464d11539ddb --- qpms/konvence | 2 ++ qpms/qpms_types.h | 5 +++++ qpms/vswf.h | 31 ++++++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/qpms/konvence b/qpms/konvence index b399eb8..36577fc 100644 --- a/qpms/konvence +++ b/qpms/konvence @@ -1,6 +1,8 @@ Konvence pro názvy alokačních, dealokačních aj. funkcí a "getrů" NÁZEV_t: identifikátor typu +NÁZEV_t *NÁZEV_make(...): vytvoř a vrať ukazatel +?err_t? NÁZEV_fill(NÁZEV_t *, ...) naplň předalokovanou věc NÁZEV_free(NÁZEV_t) NÁZEV_pfree(NÁZEV_t*) NÁZEV_get_CO(const NÁZEV_t*, const ...): získej nějakou hodnotu (triviality lze přímo) diff --git a/qpms/qpms_types.h b/qpms/qpms_types.h index 28e5352..a149299 100644 --- a/qpms/qpms_types.h +++ b/qpms/qpms_types.h @@ -45,6 +45,11 @@ typedef struct { double r, theta, phi; } sph_t; +// complex vector components in local spherical basis +typedef struct { + complex double rc, thetac, phic; +} csphvec_t; + typedef struct { double r, phi; } pol_t; diff --git a/qpms/vswf.h b/qpms/vswf.h index abea6e1..cd49799 100644 --- a/qpms/vswf.h +++ b/qpms/vswf.h @@ -2,15 +2,36 @@ #define QPMS_VSWF_H #include "qpms_types.h" +// Electric wave N; NI +complex double qpms_vswf_single_el(int m, int n, sph_t kdlj, + qpms_bessel_t btyp, qpms_normalization_t norm); +// Magnetic wave M; NI +complex double qpms_vswf_single_mg(int m, int n, sph_t kdlj, + qpms_bessel_t btyp, qpms_normalization_t norm); + +// Set of electric and magnetic VSWF in spherical coordinate basis +typedef struct { + //qpms_normalisation_t norm; + qpms_l_t lMax; + //qpms_y_t nelem; + //sph_t kdlj + csphvec_t *el, *mg; +} qpms_vswfset_sph_t; + +qpms_vswfset_sph_t *qpms_vswfset_make(qpms_l_t lMax, sph_t kdlj, + qpms_bessel_t btyp, qpms_normalization_t norm);//NI +void qpms_vswfst_sph_pfree(qpms_vswfset_t *);//NI + + + // array of pi, tau auxillary function (see [1,(37)]) -// TODO put this elsewhere (no need typedef struct { //qpms_normalization_t norm; - //qpms_l_t lMax; - qpms_y_t nelem; + qpms_l_t lMax; + //qpms_y_t nelem; double *pi, *tau; } qpms_pitau_t; -void qpms_pitau_t_free(qpms_pitau_t); -void qpms_pitau_t_pfree(qpms_pitau_t*); +void qpms_pitau_free(qpms_pitau_t);//NI +void qpms_pitau_pfree(qpms_pitau_t*);//NI #endif // QPMS_VSWF_H