12 #define M_PI_2 (1.570796326794896619231321691639751442098584699687552910487L)
15 #define M_PI (3.14159265358979323846264338327950288419716939937510582097494L)
18 #define M_SQRT2 (1.41421356237309504880168872420969807856967187537694807317668L)
21 #define M_SQRTPI (1.77245385090551602729816748334114518279754945612238712821381L)
25 typedef int qpms_lm_t;
131 QPMS_NORMALISATION_NORM_BITSTART = 65536,
192 complex
double x, y, z;
208 double r, theta, phi;
219 complex
double rc, thetac, phic;
269 double c1, ci, cj, ck;
325 #define QPMS_NO_IRREP ((qpms_iri_t) -1)
429 #define lmcheck(l,m) assert((l) >= 1 && abs(m) <= (l))
int32_t qpms_ss_pi_t
Particle index used in qpms_scatsys_t and related structures.
Definition: qpms_types.h:316
int32_t qpms_ss_tmi_t
T-matrix index used in qpms_scatsys_t and related structures.
Definition: qpms_types.h:310
size_t qpms_y_t
Type for the (l, m) multiindex of transversal (M or N -type) VSWFs.
Definition: qpms_types.h:44
static int qpms_normalisation_t_csphase(qpms_normalisation_t norm)
Determine whether the convention includes Condon-Shortley phase (-1) or not (+1).
Definition: qpms_types.h:171
qpms_normalisation_t
Vector spherical wavefuction normalisation and phase convention codes.
Definition: qpms_types.h:104
@ QPMS_NORMALISATION_NORM_POWER
The VSWFs shall be power-normalised. This is the "default".
Definition: qpms_types.h:140
@ QPMS_NORMALISATION_INVERSE
Flag indicating that qpms_normalisition_factor_* should actually return values inverse to the default...
Definition: qpms_types.h:107
@ QPMS_NORMALISATION_CONVENTION_KRISTENSSON_REAL
VSWF convention used in .
Definition: qpms_types.h:157
@ QPMS_NORMALISATION_SPHARM_REAL
Flag indicating use of the real spherical harmonics.
Definition: qpms_types.h:116
@ QPMS_NORMALISATION_UNDEF
Definition: qpms_types.h:105
@ QPMS_NORMALISATION_L_MINUS
Include an additional -factor into the longitudinal waves.
Definition: qpms_types.h:130
@ QPMS_NORMALISATION_M_I
Include an additional i -factor into the magnetic waves.
Definition: qpms_types.h:125
@ QPMS_NORMALISATION_M_MINUS
Include an additional -factor into the magnetic waves.
Definition: qpms_types.h:126
@ QPMS_NORMALISATION_L_I
Include an additional i -factor into the longitudinal waves.
Definition: qpms_types.h:129
@ QPMS_NORMALISATION_N_MINUS
Include an additional -factor into the magnetic waves.
Definition: qpms_types.h:128
@ QPMS_NORMALISATION_CONVENTION_KRISTENSSON
VSWF convention used in .
Definition: qpms_types.h:160
@ QPMS_NORMALISATION_N_I
Include an additional i -factor into the electric waves.
Definition: qpms_types.h:127
@ QPMS_NORMALISATION_REVERSE_AZIMUTHAL_PHASE
Definition: qpms_types.h:111
@ QPMS_NORMALISATION_DEFAULT
Default VSWF convention. We might encourage the compiler to expect this one.
Definition: qpms_types.h:167
@ QPMS_NORMALISATION_CSPHASE
Flag indicating usage of Condon-Shortley phase.
Definition: qpms_types.h:124
@ QPMS_NORMALISATION_NORM_SPHARM
The VSWFs shall be normalised as in .
Definition: qpms_types.h:143
@ QPMS_NORMALISATION_NORM_NONE
The VSWFs shall be created using spherical harmonics without any normalisation. Do not use.
Definition: qpms_types.h:152
@ QPMS_NORMALISATION_CONVENTION_SCUFF
VSWF convention used in SCUFF-EM .
Definition: qpms_types.h:163
struct csph_t csph_t
Spherical coordinates with complex radial component. See also vectors.h.
struct sph_t sph_t
Spherical coordinates. See also vectors.h.
int qpms_l_t
Type for spherical harmonic degree l.
Definition: qpms_types.h:27
struct qpms_quat4d_t qpms_quat4d_t
Quaternion type as four doubles.
qpms_coord_system_t
Enum codes for common coordinate systems.
Definition: qpms_types.h:238
@ QPMS_COORDS_CART2
2D cartesian.
Definition: qpms_types.h:244
@ QPMS_COORDS_CART3
Definition: qpms_types.h:245
@ QPMS_COORDS_BITRANGE
Convenience bitmask (not a valid flag!).
Definition: qpms_types.h:247
@ QPMS_COORDS_CART1
1D cartesian (= double).
Definition: qpms_types.h:241
@ QPMS_COORDS_SPH
3D spherical.
Definition: qpms_types.h:243
@ QPMS_COORDS_POL
2D polar.
Definition: qpms_types.h:242
struct cart2_t cart2_t
2D cartesian coordinates. See also vectors.h.
struct ccart3_pair ccart3_pair
3D complex vector pair (represents the E, H fields).
qpms_vswf_type_t
Codes of the VSWF types (electric/N, magnetic/M, longitudinal/L).
Definition: qpms_types.h:62
@ QPMS_VSWF_ELECTRIC
"Electric" (N -type) transversal wave.
Definition: qpms_types.h:63
@ QPMS_VSWF_LONGITUDINAL
Longitudinal (L -type) wave (not relevant for radiation).
Definition: qpms_types.h:65
@ QPMS_VSWF_MAGNETIC
"Magnetic" (M -type) transversal wave.
Definition: qpms_types.h:64
int32_t qpms_ss_tmgi_t
T-matrix generator index used in qpms_scatsys_t and related structures.
Definition: qpms_types.h:313
struct qpms_tmatrix_t qpms_tmatrix_t
A T-matrix.
struct pol_t pol_t
2D polar coordinates. See also vectors.h.
struct qpms_quat_t qpms_quat_t
Quaternion type.
int qpms_gmi_t
Finite group member index. See also groups.h.
Definition: qpms_types.h:320
unsigned long long qpms_uvswfi_t
Exhaustive index type for VSWF basis functions.
Definition: qpms_types.h:81
struct csphvec_t csphvec_t
3D complex vector components in local spherical basis. See also vectors.h.
size_t qpms_y_sc_t
Type for the (l, m) multiindex of spherical harmonics, including (0, 0).
Definition: qpms_types.h:59
qpms_errno_t
Error codes / return values for certain numerical functions.
Definition: qpms_types.h:85
@ QPMS_ERROR
Unspecified error.
Definition: qpms_types.h:87
@ QPMS_ENOMEM
Out of memory.
Definition: qpms_types.h:89
@ QPMS_NAN_ENCOUNTERED
NaN value encountered in data processing.
Definition: qpms_types.h:91
@ QPMS_SUCCESS
Success.
Definition: qpms_types.h:86
@ QPMS_ESING
Apparent singularity detected.
Definition: qpms_types.h:90
union anycoord_point_t anycoord_point_t
Union type capable to contain various 1D, 2D and 3D coordinates.
struct qpms_irot3_t qpms_irot3_t
3D improper rotations represented as a quaternion and a sign of the determinant.
int qpms_iri_t
Irreducible representation index. See also groups.h.
Definition: qpms_types.h:323
struct qpms_vswf_set_spec_t qpms_vswf_set_spec_t
Specifies a finite set of VSWFs.
struct qpms_abstract_tmatrix_t qpms_abstract_tmatrix_t
An abstract T-matrix without actual elements, but with info about particle symmetry.
struct qpms_pointgroup_t qpms_pointgroup_t
Full characterisation of a 3D point group.
const char * qpms_permutation_t
Permutation representation of a group element.
Definition: qpms_types.h:330
qpms_pointgroup_class
Classification of a 3D point group.
Definition: qpms_types.h:353
@ QPMS_PGS_I
Chiral icosahedral symmetry .
Definition: qpms_types.h:370
@ QPMS_PGS_OH
Full octahedral symmetry .
Definition: qpms_types.h:369
@ QPMS_PGS_CINF
Definition: qpms_types.h:374
@ QPMS_PGS_CINFV
Definition: qpms_types.h:376
@ QPMS_PGS_IH
Full icosahedral symmetry .
Definition: qpms_types.h:371
@ QPMS_PGS_DND
Antiprismatic symmetry .
Definition: qpms_types.h:361
@ QPMS_PGS_DN
Dihedral symmetry .
Definition: qpms_types.h:360
@ QPMS_PGS_O3
Orthogonal group.
Definition: qpms_types.h:382
@ QPMS_PGS_SO3
Special orthogonal group.
Definition: qpms_types.h:381
@ QPMS_PGS_TD
Full tetrahedral symmetry .
Definition: qpms_types.h:366
@ QPMS_PGS_CN
Rotational symmetry .
Definition: qpms_types.h:356
@ QPMS_PGS_S2N
Rotoreflectional symmetry .
Definition: qpms_types.h:357
@ QPMS_PGS_TH
Pyritohedral symmetry .
Definition: qpms_types.h:367
@ QPMS_PGS_T
Chiral tetrahedral symmetry .
Definition: qpms_types.h:365
@ QPMS_PGS_CINFH
Definition: qpms_types.h:375
@ QPMS_PGS_DINFH
Definition: qpms_types.h:378
@ QPMS_PGS_CNV
Pyramidal symmetry .
Definition: qpms_types.h:359
@ QPMS_PGS_DINF
Definition: qpms_types.h:377
@ QPMS_PGS_DNH
Prismatic symmetry .
Definition: qpms_types.h:362
@ QPMS_PGS_O
Chiral octahedral symmetry .
Definition: qpms_types.h:368
@ QPMS_PGS_CNH
Rotational symmetry with horizontal reflection .
Definition: qpms_types.h:358
struct qpms_epsmu_t qpms_epsmu_t
A type holding electric permittivity and magnetic permeability of a material.
qpms_bessel_t
Bessel function kinds.
Definition: qpms_types.h:176
@ QPMS_BESSEL_UNDEF
invalid / unspecified kind
Definition: qpms_types.h:181
@ QPMS_BESSEL_REGULAR
regular (spherical) Bessel function j (Bessel function of the first kind)
Definition: qpms_types.h:177
@ QPMS_HANKEL_MINUS
(spherical) Hankel function
Definition: qpms_types.h:180
@ QPMS_BESSEL_SINGULAR
singular (spherical) Bessel function y (Bessel function of the second kind)
Definition: qpms_types.h:178
@ QPMS_HANKEL_PLUS
(spherical) Hankel function
Definition: qpms_types.h:179
qpms_lm_t qpms_m_t
Type for spherical harmonic order m.
Definition: qpms_types.h:31
struct ccart3_t ccart3_t
3D complex (actually 6D) coordinates. See also vectors.h.
struct cart3_t cart3_t
3D cartesian coordinates. See also vectors.h.
2D cartesian coordinates. See also vectors.h.
Definition: qpms_types.h:202
3D cartesian coordinates. See also vectors.h.
Definition: qpms_types.h:186
3D complex vector pair (represents the E, H fields).
Definition: qpms_types.h:196
3D complex (actually 6D) coordinates. See also vectors.h.
Definition: qpms_types.h:191
Spherical coordinates with complex radial component. See also vectors.h.
Definition: qpms_types.h:212
3D complex vector components in local spherical basis. See also vectors.h.
Definition: qpms_types.h:218
2D polar coordinates. See also vectors.h.
Definition: qpms_types.h:223
An abstract T-matrix without actual elements, but with info about particle symmetry.
Definition: qpms_types.h:415
A type holding electric permittivity and magnetic permeability of a material.
Definition: qpms_types.h:422
complex double mu
Relative permeability.
Definition: qpms_types.h:424
complex double eps
Relative permittivity.
Definition: qpms_types.h:423
3D improper rotations represented as a quaternion and a sign of the determinant.
Definition: qpms_types.h:275
short det
Determinant of the transformation (valid values are 1 (rotation) or -1 (improper rotation)
Definition: qpms_types.h:277
qpms_quat_t rot
Quaternion representing the rotation part.
Definition: qpms_types.h:276
Full characterisation of a 3D point group.
Definition: qpms_types.h:386
qpms_pointgroup_class c
Point group classification.
Definition: qpms_types.h:387
qpms_irot3_t orientation
Transformation between this point group and the "canonical" point group of the same type.
Definition: qpms_types.h:410
qpms_gmi_t n
Definition: qpms_types.h:388
Quaternion type as four doubles.
Definition: qpms_types.h:268
Quaternion type.
Definition: qpms_types.h:261
A T-matrix.
Definition: qpms_types.h:338
bool owns_m
Information wheter m shall be deallocated with qpms_tmatrix_free()
Definition: qpms_types.h:348
const qpms_vswf_set_spec_t * spec
VSWF basis specification, NOT owned by qpms_tmatrix_t by default.
Definition: qpms_types.h:346
complex double * m
Matrix elements in row-major order.
Definition: qpms_types.h:347
Definition: tolerances.h:7
Specifies a finite set of VSWFs.
Definition: qpms_types.h:290
qpms_l_t lMax_N
Maximum degree of the electric (N-type) waves.
Definition: qpms_types.h:301
size_t capacity
Allocated capacity of ilist.
Definition: qpms_types.h:305
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_normalisation_t norm
Normalisation convention. To be set manually if needed.
Definition: qpms_types.h:306
qpms_l_t lMax_M
Maximum degree of the magnetic (M-type) waves.
Definition: qpms_types.h:298
qpms_l_t lMax_L
Maximum degree of the longitudinal (L-type) waves.
Definition: qpms_types.h:304
qpms_l_t lMax
Maximum degree of the waves specified in ilist overall.
Definition: qpms_types.h:295
Spherical coordinates. See also vectors.h.
Definition: qpms_types.h:207
Union type capable to contain various 1D, 2D and 3D coordinates.
Definition: qpms_types.h:229
double z
1D cartesian coordinate.
Definition: qpms_types.h:230