mirror of
https://github.com/TREX-CoE/Sherman-Morrison.git
synced 2024-12-25 13:53:56 +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):
|
||||
# Simply update runs selection (value and string display)
|
||||
self.select_n_runs.value = new
|
||||
self.current_n_runs = self.n_runs_dict[self.select_n_runs.value]
|
||||
self.widgets["select_n_runs"].value = new
|
||||
self.current_n_runs = self.n_runs_dict[self.widgets["select_n_runs"].value]
|
||||
|
||||
self.update_plots()
|
||||
|
||||
|
@ -87,7 +87,7 @@ T1 *outProd(T1 *vec1, T2 *vec2, unsigned int M) {
|
||||
}
|
||||
return C;
|
||||
}
|
||||
|
||||
|
||||
// // This flat version doesn't work. Get's stuck in an infinite recursion loop.
|
||||
// template <typename T> T determinant(T *A, unsigned int M) {
|
||||
// std::cout << "determinant() called..." << std::endl;
|
||||
@ -232,3 +232,15 @@ template <typename T> T residual_frobenius2(T *A, unsigned int Dim) {
|
||||
}
|
||||
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);
|
||||
bool ok = is_identity(res, dim, 1e-3);
|
||||
|
||||
double res_max = residual_max(res, dim);
|
||||
double res2 = residual_frobenius2(res, dim);
|
||||
double res2 = residual2(res, dim);
|
||||
double frob2 = norm_frobenius2(res, dim);
|
||||
|
||||
#ifdef DEBUG
|
||||
showMatrix(res, dim, "Result");
|
||||
#endif
|
||||
|
||||
vfc_put_probe(probes, &(zero_padded_group)[0], &("res_max_" + version)[0],
|
||||
res_max);
|
||||
vfc_put_probe(probes, &(zero_padded_group)[0], &("frob2_" + version)[0],
|
||||
frob2);
|
||||
vfc_put_probe(probes, &(zero_padded_group)[0], &("res2_" + version)[0], res2);
|
||||
|
||||
delete[] res, updates, u, col_update_index, slater_matrix, slater_inverse;
|
||||
|
Loading…
Reference in New Issue
Block a user