1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-18 08:53:47 +02:00

Added jastrow header to context. #22

This commit is contained in:
vijay gopal chilkuri 2021-06-23 17:56:01 +05:30
parent 8d9c02c05c
commit 7593bf7436
2 changed files with 46 additions and 22 deletions

View File

@ -31,6 +31,7 @@ int main() {
#include "qmckl_nucleus_private_type.h"
#include "qmckl_electron_private_type.h"
#include "qmckl_ao_private_type.h"
#include "qmckl_jastrow_private_type.h"
#include "qmckl_nucleus_private_func.h"
#include "qmckl_electron_private_func.h"
#include "qmckl_ao_private_func.h"
@ -118,6 +119,7 @@ typedef struct qmckl_context_struct {
qmckl_nucleus_struct nucleus;
qmckl_electron_struct electron;
qmckl_ao_basis_struct ao_basis;
qmckl_jastrow_struct jastrow;
/* To be implemented:
qmckl_mo_struct mo;

View File

@ -58,6 +58,7 @@ int main() {
#include "qmckl_memory_private_type.h"
#include "qmckl_memory_private_func.h"
#include "qmckl_jastrow_private_func.h"
#include "qmckl_jastrow_private_type.h"
#+end_src
@ -98,26 +99,26 @@ int main() {
** Data structure
#+CALL: generate_c_header(table=qmckl_jastrow_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
#+RESULTS:
#+begin_src c :tangle (eval h_func) :comments org
qmckl_exit_code qmckl_jastrow (
const int32_t uninitialized,
const int64_t aord_num,
const int64_t bord_num,
const int64_t cord_num,
const uint64_t type_nuc_num,
const uint64_t dim_cord_vec,
const double* aord_vector,
const double* bord_vector,
const double* cord_vector,
double* const factor_ee,
double* const factor_en,
double* const factor_een,
double* const factor_ee_deriv_e,
double* const factor_en_deriv_e,
double* const factor_een_deriv_e );
#+begin_src c :comments org :tangle (eval h_private_type)
typedef struct qmckl_jastrow_struct{
int32_t uninitialized;
int64_t aord_num;
int64_t bord_num;
int64_t cord_num;
uint64_t type_nuc_num;
uint64_t dim_cord_vec;
double * aord_vector;
double * bord_vector;
double * cord_vector;
double * factor_ee;
double * factor_en;
double * factor_een;
double * factor_ee_deriv_e;
double * factor_en_deriv_e;
double * factor_een_deriv_e;
bool provided;
char type;
} qmckl_jastrow_struct;
#+end_src
@ -145,8 +146,8 @@ qmckl_exit_code qmckl_init_jastrow(qmckl_context context) {
ctx->jastrow.uninitialized = (1 << 2) - 1;
/* Default values */
ctx->jastrow.rescale_factor_kappa_ee = 1.0;
ctx->jastrow.rescale_factor_kappa_en = 1.0;
//ctx->jastrow.rescale_factor_kappa_ee = 1.0;
//ctx->jastrow.rescale_factor_kappa_en = 1.0;
return QMCKL_SUCCESS;
}
@ -173,3 +174,24 @@ bool qmckl_jastrow_provided(const qmckl_context context) {
* End of files :noexport:
#+begin_src c :tangle (eval h_private_type)
#endif
#+end_src
*** Test
#+begin_src c :tangle (eval c_test)
qmckl_exit_code rc = qmckl_context_destroy(context);
assert (rc == QMCKL_SUCCESS);
return 0;
}
#+end_src
# -*- mode: org -*-
# vim: syntax=c