fix qpms_tmatrix_copy and pointer for comparison
Former-commit-id: 98d91011109689512ccda2f8aab593909d0555e0
This commit is contained in:
parent
a16cea4dca
commit
4674fa5844
|
@ -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_tmatrix_t *ti = qpms_tmatrix_apply_operation(&(orig->tm[i].op), tm_orig_omega[orig->tm[i].tmgi]);
|
||||||
qpms_ss_tmi_t j;
|
qpms_ss_tmi_t j;
|
||||||
for (j = 0; j < ss->tm_count; ++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;
|
break;
|
||||||
}
|
}
|
||||||
if (j == ss->tm_count) { // duplicity not found, save both the "abstract" and "at omega" T-matrices
|
if (j == ss->tm_count) { // duplicity not found, save both the "abstract" and "at omega" T-matrices
|
||||||
|
|
|
@ -66,7 +66,7 @@ qpms_tmatrix_t *qpms_tmatrix_copy(const qpms_tmatrix_t *T) {
|
||||||
qpms_tmatrix_t *t = qpms_tmatrix_init(T->spec);
|
qpms_tmatrix_t *t = qpms_tmatrix_init(T->spec);
|
||||||
size_t n = T->spec->n;
|
size_t n = T->spec->n;
|
||||||
for(size_t i = 0; i < n*n; ++i)
|
for(size_t i = 0; i < n*n; ++i)
|
||||||
t->m = T->m;
|
t->m[i] = T->m[i];
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue