Fix offset incrementation on the diagonal.
Solves the translation matrix projection discrepancy. Former-commit-id: 7bb7dbba47aa5ac3df32177098c096a86d2879fd
This commit is contained in:
parent
b97f3e6e2e
commit
8efd582daf
|
@ -1120,13 +1120,14 @@ complex double *qpms_scatsys_build_translation_matrix_full(
|
|||
const cart3_t posR = ss->p[piR].pos;
|
||||
size_t fullvec_offsetC = 0;
|
||||
for(qpms_ss_pi_t piC = 0; piC < ss->p_count; ++piC) {
|
||||
if(piC == piR) continue; // The diagonal will be dealt with later.
|
||||
const qpms_vswf_set_spec_t *bspecC = ss->tm[ss->p[piC].tmatrix_id]->spec;
|
||||
if(piC != piR) { // The diagonal will be dealt with later.
|
||||
const cart3_t posC = ss->p[piC].pos;
|
||||
QPMS_ENSURE_SUCCESS(qpms_trans_calculator_get_trans_array_lc3p(ss->c,
|
||||
target + fullvec_offsetR*full_len + fullvec_offsetC,
|
||||
bspecR, full_len, bspecC, 1,
|
||||
k, posR, posC));
|
||||
}
|
||||
fullvec_offsetC += bspecC->n;
|
||||
}
|
||||
assert(fullvec_offsetC = full_len);
|
||||
|
@ -1162,8 +1163,8 @@ complex double *qpms_scatsys_build_modeproblem_matrix_full(
|
|||
// dest particle T-matrix
|
||||
const complex double *tmmR = ss->tm[ss->p[piR].tmatrix_id]->m;
|
||||
for(qpms_ss_pi_t piC = 0; piC < ss->p_count; ++piC) {
|
||||
if(piC == piR) continue; // The diagonal will be dealt with later.
|
||||
const qpms_vswf_set_spec_t *bspecC = ss->tm[ss->p[piC].tmatrix_id]->spec;
|
||||
if(piC != piR) { // The diagonal will be dealt with later.
|
||||
const cart3_t posC = ss->p[piC].pos;
|
||||
QPMS_ENSURE_SUCCESS(qpms_trans_calculator_get_trans_array_lc3p(ss->c,
|
||||
tmp, // tmp is S(piR<-piC)
|
||||
|
@ -1175,6 +1176,7 @@ complex double *qpms_scatsys_build_modeproblem_matrix_full(
|
|||
tmp/*b*/, bspecC->n/*ldb*/, &zero/*beta*/,
|
||||
target + fullvec_offsetR*full_len + fullvec_offsetC /*c*/,
|
||||
full_len /*ldc*/);
|
||||
}
|
||||
fullvec_offsetC += bspecC->n;
|
||||
}
|
||||
fullvec_offsetR += bspecR->n;
|
||||
|
|
Loading…
Reference in New Issue