mirror of
https://github.com/TREX-CoE/Sherman-Morrison.git
synced 2024-12-26 22:34:05 +01:00
Merge pull request #39 from PurplePachyderm/dev
Update vfc_ci test variables and minor bugfix in HTML report
This commit is contained in:
commit
65bb0fd0b5
@ -235,8 +235,8 @@ class CompareRuns:
|
|||||||
|
|
||||||
def update_n_runs(self, attrname, old, new):
|
def update_n_runs(self, attrname, old, new):
|
||||||
# Simply update runs selection (value and string display)
|
# Simply update runs selection (value and string display)
|
||||||
self.select_n_runs.value = new
|
self.widgets["select_n_runs"].value = new
|
||||||
self.current_n_runs = self.n_runs_dict[self.select_n_runs.value]
|
self.current_n_runs = self.n_runs_dict[self.widgets["select_n_runs"].value]
|
||||||
|
|
||||||
self.update_plots()
|
self.update_plots()
|
||||||
|
|
||||||
|
@ -232,3 +232,15 @@ template <typename T> T residual_frobenius2(T *A, unsigned int Dim) {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T> T residual2(T * A, unsigned int Dim) {
|
||||||
|
double res = 0.0;
|
||||||
|
for (unsigned int i = 0; i < Dim; i++) {
|
||||||
|
for (unsigned int j = 0; j < Dim; j++) {
|
||||||
|
T delta = (A[i * Dim + j] - (i == j));
|
||||||
|
res += delta*delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
@ -133,15 +133,15 @@ int test_cycle(H5File file, int cycle, std::string version,
|
|||||||
matMul(slater_matrix, slater_inverse, res, dim);
|
matMul(slater_matrix, slater_inverse, res, dim);
|
||||||
bool ok = is_identity(res, dim, 1e-3);
|
bool ok = is_identity(res, dim, 1e-3);
|
||||||
|
|
||||||
double res_max = residual_max(res, dim);
|
double res2 = residual2(res, dim);
|
||||||
double res2 = residual_frobenius2(res, dim);
|
double frob2 = norm_frobenius2(res, dim);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
showMatrix(res, dim, "Result");
|
showMatrix(res, dim, "Result");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vfc_put_probe(probes, &(zero_padded_group)[0], &("res_max_" + version)[0],
|
vfc_put_probe(probes, &(zero_padded_group)[0], &("frob2_" + version)[0],
|
||||||
res_max);
|
frob2);
|
||||||
vfc_put_probe(probes, &(zero_padded_group)[0], &("res2_" + version)[0], res2);
|
vfc_put_probe(probes, &(zero_padded_group)[0], &("res2_" + version)[0], res2);
|
||||||
|
|
||||||
delete[] res, updates, u, col_update_index, slater_matrix, slater_inverse;
|
delete[] res, updates, u, col_update_index, slater_matrix, slater_inverse;
|
||||||
|
Loading…
Reference in New Issue
Block a user