diff --git a/qpms/scatsystem.c b/qpms/scatsystem.c index 805c5ea..2d48fd7 100644 --- a/qpms/scatsystem.c +++ b/qpms/scatsystem.c @@ -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 diff --git a/qpms/tmatrices.c b/qpms/tmatrices.c index c60f146..25146cc 100644 --- a/qpms/tmatrices.c +++ b/qpms/tmatrices.c @@ -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; }