New qpms_normalisation_t also in scatsystem.c; python module now

compiles.


Former-commit-id: ac877f894c124660f399bb3e70ed05ca42f565cb
This commit is contained in:
Marek Nečada 2019-07-14 20:50:27 +03:00
parent 5720e9998d
commit 1ec776c8a8
3 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@ include_directories(${DIRS})
add_library (qpms translations.c tmatrices.c vecprint.c vswf.c wigner.c
lattices2d.c gaunt.c error.c legendre.c symmetries.c vecprint.c
bessel.c own_zgemm.c parsing.c)
bessel.c own_zgemm.c parsing.c scatsystem.c)
use_c99()
set(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES})

View File

@ -722,7 +722,7 @@ cdef class BaseSpec:
if 'norm' in kwargs.keys():
self.s.norm = kwargs['norm']
else:
self.s.norm = QPMS_NORMALISATION_NORM_POWER | QPMS_NORMALISATION_CSPHASE
self.s.norm = <qpms_normalisation_t>(QPMS_NORMALISATION_NORM_POWER | QPMS_NORMALISATION_CSPHASE)
# set the other metadata
cdef qpms_l_t l
self.s.lMax_L = -1

View File

@ -431,10 +431,10 @@ void qpms_scatsys_free(qpms_scatsys_t *ss) {
// (perhaps just use qpms_normalisation_t_factor() at the right places)
static inline void check_norm_compat(const qpms_vswf_set_spec_t *s)
{
switch (qpms_normalisation_t_normonly(s->norm)) {
case QPMS_NORMALISATION_POWER:
switch (s->norm & QPMS_NORMALISATION_NORM_BITS) {
case QPMS_NORMALISATION_NORM_POWER:
break;
case QPMS_NORMALISATION_SPHARM:
case QPMS_NORMALISATION_NORM_SPHARM:
break;
default:
abort(); // Only SPHARM and POWER norms are supported right now.
@ -447,7 +447,7 @@ complex double *qpms_orbit_action_matrix(complex double *target,
assert(sym); assert(g < sym->order);
assert(sym->rep3d);
assert(ot); assert(ot->size > 0);
check_norm_compat(bspec);
// check_norm_compat(bspec); not needed here, the qpms_irot3_uvswfi_dense should complain if necessary
const size_t n = bspec->n;
const qpms_gmi_t N = ot->size;
if (target == NULL)
@ -491,7 +491,7 @@ complex double *qpms_orbit_irrep_projector_matrix(complex double *target,
assert(sym->rep3d);
assert(ot); assert(ot->size > 0);
assert(iri < sym->nirreps); assert(sym->irreps);
check_norm_compat(bspec);
// check_norm_compat(bspec); // probably not needed here, let the called functions complain if necessary, but CHEKME
const size_t n = bspec->n;
const qpms_gmi_t N = ot->size;
if (target == NULL)
@ -545,7 +545,7 @@ complex double *qpms_orbit_irrep_basis(size_t *basis_size,
assert(sym->rep3d);
assert(ot); assert(ot->size > 0);
assert(iri < sym->nirreps); assert(sym->irreps);
check_norm_compat(bspec);
check_norm_compat(bspec); // Here I'm not sure; CHECKME
const size_t n = bspec->n;
const qpms_gmi_t N = ot->size;
const bool newtarget = (target == NULL);
@ -1451,7 +1451,7 @@ complex double *qpms_scatsys_build_modeproblem_matrix_irrep_packed_parallelR(
for(long thi = 0; thi < nthreads; ++thi)
QPMS_ENSURE_SUCCESS(pthread_create(thread_ids + thi, NULL,
qpms_scatsys_build_modeproblem_matrix_irrep_packed_parallelR_thread,
&arg));
(void *) &arg));
for(long thi = 0; thi < nthreads; ++thi) {
void *retval;
QPMS_ENSURE_SUCCESS(pthread_join(thread_ids[thi], &retval));