diff --git a/qpms/qpms_c.pyx b/qpms/qpms_c.pyx index d99b6fc..c78e764 100644 --- a/qpms/qpms_c.pyx +++ b/qpms/qpms_c.pyx @@ -449,9 +449,9 @@ cdef class ScatteringSystem: qpms_scatsys_build_modeproblem_matrix_irrep_packed_orbitorderR(&target_view[0][0], self.s, iri, k) elif (version == 'pR'): with nogil: - qpms_scatsys_build_modeproblem_matrix_irrep_packed_parallelR(&target_view[0][0], self.s, iri, k) - else: qpms_scatsys_build_modeproblem_matrix_irrep_packed(&target_view[0][0], self.s, iri, k) + else: + qpms_scatsys_build_modeproblem_matrix_irrep_packed_serial(&target_view[0][0], self.s, iri, k) return target def translation_matrix_full(self, double k, J = QPMS_HANKEL_PLUS): diff --git a/qpms/qpms_cdefs.pxd b/qpms/qpms_cdefs.pxd index ee02028..fbba8dd 100644 --- a/qpms/qpms_cdefs.pxd +++ b/qpms/qpms_cdefs.pxd @@ -532,7 +532,7 @@ cdef extern from "scatsystem.h": const qpms_scatsys_t *ss, qpms_iri_t iri, cdouble k, qpms_bessel_t J) cdouble *qpms_scatsys_build_modeproblem_matrix_irrep_packed_orbitorderR( cdouble *target, const qpms_scatsys_t *ss, qpms_iri_t iri, cdouble k) - cdouble *qpms_scatsys_build_modeproblem_matrix_irrep_packed_parallelR( + cdouble *qpms_scatsys_build_modeproblem_matrix_irrep_packed_serial( cdouble *target, const qpms_scatsys_t *ss, qpms_iri_t iri, cdouble k) nogil cdouble *qpms_scatsys_incident_field_vector_full(cdouble *target_full, const qpms_scatsys_t *ss, qpms_incfield_t field_at_point, diff --git a/qpms/scatsystem.c b/qpms/scatsystem.c index 4c5c8aa..a697d0f 100644 --- a/qpms/scatsystem.c +++ b/qpms/scatsystem.c @@ -1063,7 +1063,8 @@ complex double *qpms_scatsys_build_modeproblem_matrix_full( return target; } -complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed( +// Serial reference implementation. +complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_serial( /// Target memory with capacity for ss->saecv_sizes[iri]**2 elements. If NULL, new will be allocated. complex double *target_packed, const qpms_scatsys_t *ss, qpms_iri_t iri, @@ -1615,7 +1616,9 @@ complex double *qpms_scatsys_build_translation_matrix_e_irrep_packed( return target_packed; } -complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_parallelR( + +// Parallel implementation, now default +complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed( /// Target memory with capacity for ss->saecv_sizes[iri]**2 elements. If NULL, new will be allocated. complex double *target_packed, const qpms_scatsys_t *ss, qpms_iri_t iri, diff --git a/qpms/scatsystem.h b/qpms/scatsystem.h index 33ecc86..16578a6 100644 --- a/qpms/scatsystem.h +++ b/qpms/scatsystem.h @@ -286,8 +286,8 @@ complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_orbitorderR( const qpms_scatsys_t *ss, qpms_iri_t iri, complex double k ///< Wave number to use in the translation matrix. ); -/// Alternative implementation of qpms_scatsys_build_modeproblem_matrix_irrep_packed(). -complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_orbitorder_parallelR( +/// Alternative (serial reference) implementation of qpms_scatsys_build_modeproblem_matrix_irrep_packed(). +complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_orbitorder_serial( /// Target memory with capacity for ss->fecv_size**2 elements. If NULL, new will be allocated. complex double *target, const qpms_scatsys_t *ss, qpms_iri_t iri,