Support for constant T-matrix generator in cython.

Former-commit-id: 31024cb82d94fad7c1bbb9be91be8041611d6651
This commit is contained in:
Marek Nečada 2020-01-14 19:09:26 +02:00
parent b6e6554323
commit 8b8d002d42
2 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,10 @@ cdef class TMatrixGenerator:
self.holder = what
self.g.function = qpms_tmatrix_generator_axialsym
self.g.params = (<__AxialSymParams?>self.holder).rawpointer()
elif isinstance(what, CTMatrix):
self.holder = what
self.g.function = qpms_tmatrix_generator_constant
self.g.params = <void*>(<CTMatrix?>self.holder).rawpointer()
# TODO INTERPOLATOR
else:
raise TypeError("Can't construct TMatrixGenerator from that")

View File

@ -408,6 +408,7 @@ cdef extern from "tmatrices.h":
qpms_errno_t qpms_tmatrix_generator_axialsym(qpms_tmatrix_t *t, cdouble omega, const void *params)
qpms_errno_t qpms_tmatrix_generator_interpolator(qpms_tmatrix_t *t, cdouble omega, const void *params)
qpms_errno_t qpms_tmatrix_generator_sphere(qpms_tmatrix_t *t, cdouble omega, const void *params)
qpms_errno_t qpms_tmatrix_generator_constant(qpms_tmatrix_t *t, cdouble omega, const void *params)
struct qpms_tmatrix_generator_sphere_param_t:
qpms_epsmu_generator_t outside
qpms_epsmu_generator_t inside