mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-23 04:44:03 +01:00
Added checking providers for electron and nucleus distance. #22
This commit is contained in:
parent
de65455eee
commit
01516c84c5
@ -194,7 +194,7 @@ qmckl_exit_code qmckl_init_jastrow(qmckl_context context) {
|
||||
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||
assert (ctx != NULL);
|
||||
|
||||
ctx->jastrow.uninitialized = (1 << 5) - 1;
|
||||
ctx->jastrow.uninitialized = (1 << 6) - 1;
|
||||
|
||||
/* Default values */
|
||||
|
||||
@ -394,6 +394,7 @@ qmckl_exit_code qmckl_set_jastrow_type_nuc_num (qmckl_context context, const i
|
||||
qmckl_exit_code qmckl_set_jastrow_aord_vector (qmckl_context context, const double * aord_vector);
|
||||
qmckl_exit_code qmckl_set_jastrow_bord_vector (qmckl_context context, const double * bord_vector);
|
||||
qmckl_exit_code qmckl_set_jastrow_cord_vector (qmckl_context context, const double * cord_vector);
|
||||
qmckl_exit_code qmckl_set_jastrow_dependencies (qmckl_context context);
|
||||
#+end_src
|
||||
|
||||
#+NAME:pre2
|
||||
@ -607,6 +608,31 @@ qmckl_exit_code qmckl_set_jastrow_cord_vector(qmckl_context context, double cons
|
||||
|
||||
<<post2>>
|
||||
}
|
||||
|
||||
qmckl_exit_code qmckl_set_jastrow_dependencies(qmckl_context context) {
|
||||
<<pre2>>
|
||||
|
||||
/* Check for electron data */
|
||||
if (!(ctx->electron.provided)) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_NOT_PROVIDED,
|
||||
"qmckl_provide_ee_distance",
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Check for nucleus data */
|
||||
if (!(ctx->nucleus.provided)) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_NOT_PROVIDED,
|
||||
"qmckl_provide_en_distance",
|
||||
NULL);
|
||||
}
|
||||
|
||||
int32_t mask = 1 << 6;
|
||||
|
||||
<<post2>>
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
When the required information is completely entered, other data structures are
|
||||
|
Loading…
Reference in New Issue
Block a user