49#ifndef QPMS_SCATSPEC_H
50#define QPMS_SCATSPEC_H
65 _Complex
double value;
83 char *errbuf,
size_t errlen);
89 char *errbuf,
size_t errlen);
209 _Complex
double omega);
248 _Complex
double omega);
259 _Complex
double omega);
const qpms_finite_group_t * qpms_scatspec_symmetry(const qpms_scatspec_t *spec)
Definition scatspec.c:3284
const char * qpms_scatspec_kind_name(const qpms_scatspec_t *spec, size_t ki)
Name of a particle kind, or NULL if ki is out of range (borrowed pointer).
Definition scatspec.c:3190
size_t qpms_scatspec_kind_count(const qpms_scatspec_t *spec)
Number of particle kinds defined in the spec.
Definition scatspec.c:3186
int qpms_scatspec_kind_source(const qpms_scatspec_t *spec, size_t ki)
T-matrix source kind of a particle kind, or -1 if ki is out of range.
Definition scatspec.c:3195
int qpms_scatspec_system_fingerprint(const qpms_scatspec_t *spec, char hex[65])
Computes a SHA-256 fingerprint of the resolved physical system.
Definition scatspec.c:3564
void qpms_scatspec_positions(const qpms_scatspec_t *spec, cart3_t *out)
Definition scatspec.c:3181
void qpms_scatspec_free(qpms_scatspec_t *spec)
Frees a spec. Any qpms_scatsys_t built from it becomes invalid afterwards.
Definition scatspec.c:160
qpms_epsmu_t qpms_scatspec_medium_eval(const qpms_scatspec_t *spec, _Complex double omega)
Evaluates the background medium (system.medium) at an angular frequency.
Definition scatspec.c:3268
qpms_scatspec_kindsource_t
Origin of a particle kind's T-matrix.
Definition scatspec.h:105
@ QPMS_SCATSPEC_KINDSOURCE_CORE_SHELL_SPHERE
(core-shell) sphere, Mie
Definition scatspec.h:112
@ QPMS_SCATSPEC_KINDSOURCE_SCUFFGEN
Definition scatspec.h:117
@ QPMS_SCATSPEC_KINDSOURCE_CUT_SPHERE
Definition scatspec.h:110
@ QPMS_SCATSPEC_KINDSOURCE_CONE
analytic (possibly truncated) cone
Definition scatspec.h:109
@ QPMS_SCATSPEC_KINDSOURCE_DUMMY
zero T-matrix
Definition scatspec.h:121
@ QPMS_SCATSPEC_KINDSOURCE_SUPERELLIPSOID
Definition scatspec.h:114
@ QPMS_SCATSPEC_KINDSOURCE_CYLINDER
analytic axially symmetric cylinder
Definition scatspec.h:107
@ QPMS_SCATSPEC_KINDSOURCE_SPHERE
analytic Lorentz-Mie sphere
Definition scatspec.h:106
@ QPMS_SCATSPEC_KINDSOURCE_HDF5_FILE
community-format .tmat.h5 file
Definition scatspec.h:120
@ QPMS_SCATSPEC_KINDSOURCE_SPHEROID
analytic axially symmetric spheroid
Definition scatspec.h:108
@ QPMS_SCATSPEC_KINDSOURCE_CONSTANT
Definition scatspec.h:122
@ QPMS_SCATSPEC_KINDSOURCE_SCUFF_FILE
scuff-em .TMatrix text file
Definition scatspec.h:119
qpms_scatsys_t * qpms_scatspec_build_scatsys_with_group(const qpms_scatspec_t *spec, const qpms_finite_group_t *group, _Complex double omega)
Definition scatspec.c:3384
qpms_scatspec_t * qpms_scatspec_parse_file(const char *path, const qpms_scatspec_var_t *overrides, size_t noverrides, char *errbuf, size_t errlen)
Parses and validates a spec file.
Definition scatspec.c:2629
_Complex double qpms_scatspec_omega(const qpms_scatspec_t *spec)
Definition scatspec.c:3297
int qpms_scatspec_has_omega(const qpms_scatspec_t *spec)
Returns whether the spec defines the initial frequency (system.omega).
Definition scatspec.c:3293
_Bool qpms_scatspec_kind_shapeinfo(const qpms_scatspec_t *spec, size_t ki, qpms_scatspec_shapeinfo_t *out)
Definition scatspec.c:3205
void qpms_scatspec_particle_transforms(const qpms_scatspec_t *spec, qpms_irot3_t *out)
Definition scatspec.c:3262
void qpms_scatspec_particle_kinds(const qpms_scatspec_t *spec, size_t *out)
Definition scatspec.c:3257
size_t qpms_scatspec_particle_count(const qpms_scatspec_t *spec)
Number of particles after the placement expansion.
Definition scatspec.c:3177
const qpms_vswf_set_spec_t * qpms_scatspec_kind_bspec(const qpms_scatspec_t *spec, size_t ki)
Definition scatspec.c:3251
qpms_scatspec_t * qpms_scatspec_parse_string(const char *yaml, ssize_t len, const qpms_scatspec_var_t *overrides, size_t noverrides, char *errbuf, size_t errlen)
As qpms_scatspec_parse_file(), but parses from a NUL-terminated string.
Definition scatspec.c:2636
const char * qpms_scatspec_kind_file(const qpms_scatspec_t *spec, size_t ki)
Definition scatspec.c:3200
qpms_scatsys_t * qpms_scatspec_build_scatsys(const qpms_scatspec_t *spec, _Complex double omega)
Builds a scattering system from the spec.
Definition scatspec.c:3379
int qpms_scatspec_lattice_dimension(const qpms_scatspec_t *spec)
Lattice dimension (0 = finite system, 1-3 = periodic).
Definition scatspec.c:3275
void qpms_scatspec_lattice_basis(const qpms_scatspec_t *spec, cart3_t *out)
Copies the lattice basis vectors to out (which must have room for 3).
Definition scatspec.c:3279
Modern interface for finite lattice calculations, including symmetries.
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 point group with its irreducible representations and some metadata.
Definition groups.h:56
3D improper rotations represented as a quaternion and a sign of the determinant.
Definition qpms_types.h:280
Definition scatspec.h:139
long lMax_extend
Definition scatspec.h:145
const char * outside
Definition scatspec.h:178
const char * shape_params
given" (owned by the spec; NULL otherwise)
Definition scatspec.h:172
double deltay
wedge top-face shift in y (0 otherwise)
Definition scatspec.h:164
double apex_shift
pyramid apex lateral displacement
Definition scatspec.h:168
double mesh_lc
Definition scatspec.h:170
double radius_major
torus/ring major radius (0 for other kinds)
Definition scatspec.h:158
double angle
pyramid apex displacement azimuth
Definition scatspec.h:169
double radius
Definition scatspec.h:140
double shift
regular_prism base polygon azimuthal offset
Definition scatspec.h:167
double e_parm
Definition scatspec.h:156
const char * material
Definition scatspec.h:174
double radius_bottom
cone bottom base radius (0 for other kinds)
Definition scatspec.h:152
double n_parm
Definition scatspec.h:154
double radiusxy
Definition scatspec.h:147
double lengthy
rectangular_cuboid/wedge extent in y (0 otherwise)
Definition scatspec.h:161
double radius_0
core-shell sphere core radius (0 for other kinds)
Definition scatspec.h:153
double lengthx
rectangular_cuboid/wedge extent in x (0 otherwise)
Definition scatspec.h:160
double deltax
wedge top-face shift in x (0 otherwise)
Definition scatspec.h:163
double height
Definition scatspec.h:143
const char * core
Definition scatspec.h:176
double radius_minor
torus/ring minor radius (0 for other kinds)
Definition scatspec.h:159
long n_edges
Definition scatspec.h:165
double radius_top
cone top base radius (0 for other kinds)
Definition scatspec.h:151
double radiusz
Definition scatspec.h:149
double lengthz
rectangular_cuboid/wedge extent in z (0 otherwise)
Definition scatspec.h:162
char * path
file the spec was loaded from (or NULL)
Definition scatspec.c:102
A named variable override for the spec parser.
Definition scatspec.h:63
Common "class" for system of scatterers, both periodic and non-periodic.
Definition scatsystem.h:175
Result of the point-group detection for a finite particle arrangement.
Definition spgsym.h:57
Specifies a finite set of VSWFs.
Definition qpms_types.h:295