QPMS
Electromagnetic multiple scattering library and toolkit.
Loading...
Searching...
No Matches
tmatrix_hdf5.h
Go to the documentation of this file.
1
33#ifndef QPMS_TMATRIX_HDF5_H
34#define QPMS_TMATRIX_HDF5_H
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#include "qpms_types.h"
40#include "tmatrices.h"
41
43
48#define QPMS_TMATRIX_HDF5_NORM \
49 ((qpms_normalisation_t)(QPMS_NORMALISATION_NORM_SPHARM \
50 | QPMS_NORMALISATION_CSPHASE))
51
64
66
72 char *errbuf, size_t errlen);
73
76
78
85 const qpms_tmatrix_hdf5_t *h);
86
88
96 size_t nfreq;
97 const _Complex double *omegas;
98 const _Complex double *data;
100 const char *name;
101 const char *description;
102 const char *keywords;
103 const char *software;
104 const char *method;
107
111 size_t nparticles;
113
115
125 char *errbuf, size_t errlen);
126
127#ifdef __cplusplus
128}
129#endif
130#endif // QPMS_TMATRIX_HDF5_H
Common qpms types.
qpms_errno_t
Error codes / return values for certain numerical functions.
Definition qpms_types.h:88
3D cartesian coordinates. See also vectors.h.
Definition qpms_types.h:191
A type holding electric permittivity and magnetic permeability of a material.
Definition qpms_types.h:439
A T-matrix sweep loaded from a community-format .tmat.h5 file.
Definition tmatrix_hdf5.h:53
char * description
Root attribute /description (owned; NULL if absent).
Definition tmatrix_hdf5.h:62
qpms_epsmu_t * embedding
Background medium at each frequency (owned).
Definition tmatrix_hdf5.h:59
qpms_vswf_set_spec_t * bspec
Basis spec in file mode order (owned).
Definition tmatrix_hdf5.h:55
char * name
Root attribute /name (owned; NULL if absent).
Definition tmatrix_hdf5.h:61
_Complex double * data
T-matrix data, nfreq * n * n, row-major per frequency (owned).
Definition tmatrix_hdf5.h:58
double * omegas
Angular frequencies [rad/s], strictly increasing (owned).
Definition tmatrix_hdf5.h:57
char * path
Source file path (owned).
Definition tmatrix_hdf5.h:54
char * sweep_quantity
Which dataset defined the sweep, e.g. "frequency" (owned).
Definition tmatrix_hdf5.h:60
size_t nfreq
Length of the frequency sweep (a axis).
Definition tmatrix_hdf5.h:56
Parameters of the community-format .tmat.h5 writer.
Definition tmatrix_hdf5.h:94
const _Complex double * omegas
Angular frequencies [rad/s].
Definition tmatrix_hdf5.h:97
size_t nparticles
Length of particle_positions.
Definition tmatrix_hdf5.h:111
const char * name
Root attribute /name (optional).
Definition tmatrix_hdf5.h:100
const char * computation_description
Definition tmatrix_hdf5.h:105
const qpms_epsmu_t * embedding
Background medium per frequency.
Definition tmatrix_hdf5.h:99
const _Complex double * data
T-matrices, nfreq * n * n, row-major.
Definition tmatrix_hdf5.h:98
size_t nfreq
Sweep length (the a axis).
Definition tmatrix_hdf5.h:96
const cart3_t * particle_positions
Particle positions of a composite scatterer (optional provenance).
Definition tmatrix_hdf5.h:110
const qpms_vswf_set_spec_t * bspec
VSWF basis of the modes group.
Definition tmatrix_hdf5.h:95
const char * description
Root attribute /description (optional).
Definition tmatrix_hdf5.h:101
const char * method
/computation/method (required).
Definition tmatrix_hdf5.h:104
const char * software
/computation/software (required).
Definition tmatrix_hdf5.h:103
const char * keywords
Root attribute /keywords (optional).
Definition tmatrix_hdf5.h:102
Definition tmatrices.h:338
Specifies a finite set of VSWFs.
Definition qpms_types.h:295
T-matrices for scattering systems.
qpms_errno_t qpms_tmatrix_hdf5_write(const char *path, const qpms_tmatrix_hdf5_write_params_t *params, char *errbuf, size_t errlen)
Writes a T-matrix sweep into a community-format .tmat.h5 file.
Definition tmatrix_hdf5.c:787
qpms_tmatrix_interpolator_t * qpms_tmatrix_hdf5_interpolator(const qpms_tmatrix_hdf5_t *h)
Creates a frequency interpolator over the loaded sweep.
Definition tmatrix_hdf5.c:707
qpms_tmatrix_hdf5_t * qpms_tmatrix_hdf5_read(const char *path, char *errbuf, size_t errlen)
Reads a T-matrix sweep from a community-format .tmat.h5 file.
Definition tmatrix_hdf5.c:345
void qpms_tmatrix_hdf5_free(qpms_tmatrix_hdf5_t *h)
Frees a T-matrix sweep.
Definition tmatrix_hdf5.c:691