fix qpms_tmatrix_copy and pointer for comparison

Former-commit-id: 98d91011109689512ccda2f8aab593909d0555e0
This commit is contained in:
Marek Nečada 2020-01-16 10:01:06 +02:00
parent a16cea4dca
commit 4674fa5844
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ qpms_scatsys_at_omega_t *qpms_scatsys_apply_symmetry(const qpms_scatsys_t *orig,
qpms_tmatrix_t *ti = qpms_tmatrix_apply_operation(&(orig->tm[i].op), tm_orig_omega[orig->tm[i].tmgi]);
qpms_ss_tmi_t j;
for (j = 0; j < ss->tm_count; ++j)
if (qpms_tmatrix_isclose(ssw->tm[i], ssw->tm[j], tol->rtol, tol->atol)) {
if (qpms_tmatrix_isclose(ti, ssw->tm[j], tol->rtol, tol->atol)) {
break;
}
if (j == ss->tm_count) { // duplicity not found, save both the "abstract" and "at omega" T-matrices

View File

@ -66,7 +66,7 @@ qpms_tmatrix_t *qpms_tmatrix_copy(const qpms_tmatrix_t *T) {
qpms_tmatrix_t *t = qpms_tmatrix_init(T->spec);
size_t n = T->spec->n;
for(size_t i = 0; i < n*n; ++i)
t->m = T->m;
t->m[i] = T->m[i];
return t;
}