mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-19 20:42:50 +01:00
Merge pull request #100 from fmgjcoppens/master
Return QMCKL_FAILURE if return code from qmckl_slagel_splitting equal…
This commit is contained in:
commit
345cf8525b
@ -1006,14 +1006,16 @@ qmckl_exit_code qmckl_sherman_morrison_splitting(const qmckl_context context,
|
||||
uint64_t later_index[N_updates];
|
||||
uint64_t later = 0;
|
||||
|
||||
(void) qmckl_slagel_splitting(
|
||||
LDS, Dim, N_updates, Updates, Updates_index, breakdown, Slater_inv,
|
||||
later_updates, later_index, &later, determinant);
|
||||
qmckl_exit_code rc = qmckl_slagel_splitting(
|
||||
LDS, Dim, N_updates, Updates, Updates_index, breakdown, Slater_inv,
|
||||
later_updates, later_index, &later, determinant);
|
||||
if (rc != QMCKL_SUCCESS) return QMCKL_FAILURE;
|
||||
|
||||
if (later > 0) {
|
||||
(void) qmckl_sherman_morrison_splitting(
|
||||
context, LDS, Dim, later, later_updates, later_index, breakdown,
|
||||
Slater_inv, determinant);
|
||||
qmckl_exit_code rc = qmckl_sherman_morrison_splitting(
|
||||
context, LDS, Dim, later, later_updates, later_index, breakdown,
|
||||
Slater_inv, determinant);
|
||||
if (rc != QMCKL_SUCCESS) return QMCKL_FAILURE;
|
||||
}
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
@ -1251,17 +1253,19 @@ qmckl_exit_code qmckl_sherman_morrison_smw32s(const qmckl_context context,
|
||||
const double* Updates_1block = &Updates[n_of_3blocks * length_3block];
|
||||
const uint64_t* Updates_index_1block = &Updates_index[3 * n_of_3blocks];
|
||||
uint64_t l = 0;
|
||||
(void) qmckl_slagel_splitting(
|
||||
qmckl_exit_code rc = qmckl_slagel_splitting(
|
||||
LDS, Dim, 1, Updates_1block, Updates_index_1block, breakdown,
|
||||
Slater_inv, later_updates + (LDS * later), later_index + later, &l,
|
||||
determinant);
|
||||
if (rc != QMCKL_SUCCESS) return QMCKL_FAILURE;
|
||||
later += l;
|
||||
}
|
||||
|
||||
if (later > 0) {
|
||||
(void) qmckl_sherman_morrison_splitting(
|
||||
qmckl_exit_code rc = qmckl_sherman_morrison_splitting(
|
||||
context, LDS, Dim, later, later_updates, later_index, breakdown,
|
||||
Slater_inv, determinant);
|
||||
if (rc != QMCKL_SUCCESS) return QMCKL_FAILURE;
|
||||
}
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user