ScatteringSystem, ... definitions to pxd file

This commit is contained in:
Marek Nečada 2020-11-19 04:37:57 +02:00
parent c4d0700aca
commit 210ddaa527
2 changed files with 30 additions and 19 deletions

View File

@ -1,4 +1,6 @@
from .qpms_cdefs cimport qpms_finite_group_t
from .qpms_cdefs cimport qpms_finite_group_t, qpms_scatsys_t, qpms_iri_t,\
qpms_scatsys_at_omega_t, qpms_scatsys_at_omega_k_t
from .cymaterials cimport EpsMuGenerator
cdef class FinitePointGroup:
cdef readonly bint owns_data
@ -6,3 +8,30 @@ cdef class FinitePointGroup:
cdef inline qpms_finite_group_t *rawpointer(self):
return self.G
cdef class ScatteringSystem:
cdef list tmgobjs # here we keep the references to occuring TMatrixFunctions (and hence BaseSpecs and TMatrixGenerators)
#cdef list Tmatrices # Here we keep the references to occuring T-matrices
cdef EpsMuGenerator medium_holder # Here we keep the reference to medium generator
cdef qpms_scatsys_t *s
cdef FinitePointGroup sym
cdef qpms_iri_t iri_py2c(self, iri, allow_None=?)
cdef class _ScatteringSystemAtOmegaK:
cdef qpms_scatsys_at_omega_k_t sswk
cdef _ScatteringSystemAtOmega ssw_pyref
cdef inline qpms_scatsys_at_omega_k_t *rawpointer(self):
return &self.sswk
cdef class _ScatteringSystemAtOmega:
cdef qpms_scatsys_at_omega_t *ssw
cdef ScatteringSystem ss_pyref
cdef inline qpms_scatsys_at_omega_t *rawpointer(self):
return self.ssw

View File

@ -369,12 +369,6 @@ cdef class ScatteringSystem:
Currently, it does not have a standard constructor. Use the
ScatteringSystem.create() method instead.
'''
cdef list tmgobjs # here we keep the references to occuring TMatrixFunctions (and hence BaseSpecs and TMatrixGenerators)
#cdef list Tmatrices # Here we keep the references to occuring T-matrices
cdef EpsMuGenerator medium_holder # Here we keep the reference to medium generator
cdef qpms_scatsys_t *s
cdef FinitePointGroup sym
cdef qpms_iri_t iri_py2c(self, iri, allow_None = True):
if iri is None and allow_None:
return QPMS_NO_IRREP
@ -1009,12 +1003,6 @@ cdef class _ScatteringSystemAtOmegaK:
This represents an infinite periodic system with a given (fixed) frequency and Bloch vector.
'''
cdef qpms_scatsys_at_omega_k_t sswk
cdef _ScatteringSystemAtOmega ssw_pyref
cdef qpms_scatsys_at_omega_k_t *rawpointer(self):
return &self.sswk
property eta:
"""Ewald parameter η"""
def __get__(self):
@ -1121,9 +1109,6 @@ cdef class _ScatteringSystemAtOmega:
that keeps the T-matrix and background data evaluated
at specific frequency.
'''
cdef qpms_scatsys_at_omega_t *ssw
cdef ScatteringSystem ss_pyref
def check(self): # cdef instead?
if not self.ssw:
raise ValueError("_ScatteringSystemAtOmega's ssw-pointer not set. You must not use the default constructor; ScatteringSystem.create() instead")
@ -1152,9 +1137,6 @@ cdef class _ScatteringSystemAtOmega:
qpms_scatsysw_apply_Tmatrices_full(&target_view[0], &a_view[0], self.ssw)
return target_np
cdef qpms_scatsys_at_omega_t *rawpointer(self):
return self.ssw
def scatter_solver(self, iri=None, k=None):
self.check()
cdef _ScatteringSystemAtOmegaK sswk # used only for periodic systems