1 #ifndef TRANSLATIONS_INLINES_H
2 #define TRANSLATIONS_INLINES_H
8 static inline void qpms_trans_array_from_AB(
11 const size_t t_deststride,
13 const size_t t_srcstride,
14 const complex
double *
const A,
const complex
double *
const B,
22 QPMS_PARANOID_ASSERT(lMax_AB >= t_srcspec->
lMax && lMax_AB >= t_destspec->
lMax);
23 const qpms_y_t nelem_AB = qpms_lMax2nelem(lMax_AB);
24 for (
size_t desti = 0; desti < t_destspec->
n; ++desti) {
27 "Invalid u. vswf index %llx.", t_destspec->
ilist[desti]);
28 for (
size_t srci = 0; srci < t_srcspec->
n; ++srci){
31 "Invalid u. vswf index %llx.", t_srcspec->
ilist[srci]); t[srci * t_srcstride + desti * t_deststride]
32 = (srct == destt) ? A[desty*nelem_AB + srcy] : B[desty*nelem_AB + srcy];
Various index conversion functions.
static qpms_errno_t qpms_uvswfi2ty(qpms_uvswfi_t u, qpms_vswf_type_t *t, qpms_y_t *y)
Conversion from universal VSWF index u to type and the traditional layout index (l > 0).
Definition: indexing.h:83
#define QPMS_ENSURE_SUCCESS_M(x, msg,...)
Raises an error if x is not zero, with custom error message.
Definition: qpms_error.h:207
size_t qpms_y_t
Type for the (l, m) multiindex of transversal (M or N -type) VSWFs.
Definition: qpms_types.h:44
int qpms_l_t
Type for spherical harmonic degree l.
Definition: qpms_types.h:27
qpms_vswf_type_t
Codes of the VSWF types (electric/N, magnetic/M, longitudinal/L).
Definition: qpms_types.h:62
Specifies a finite set of VSWFs.
Definition: qpms_types.h:290
size_t n
Actual number of VSWF indices included in ilist.
Definition: qpms_types.h:291
qpms_uvswfi_t * ilist
Definition: qpms_types.h:292
qpms_l_t lMax
Maximum degree of the waves specified in ilist overall.
Definition: qpms_types.h:295
VSWF translation operator.