mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Hide code in doc
This commit is contained in:
parent
399a632bdd
commit
59d56f6b27
@ -152,11 +152,8 @@ typedef struct qmckl_ao_basis_struct {
|
||||
struct is then initialized and ~provided == true~.
|
||||
|
||||
** Access functions
|
||||
|
||||
Access to scalars copies the values at the passed address, and
|
||||
for array values a pointer to the array is returned.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_private_func)
|
||||
#+begin_src c :comments org :tangle (eval h_private_func) :exports none
|
||||
char qmckl_get_ao_basis_type (const qmckl_context context);
|
||||
int64_t qmckl_get_ao_basis_shell_num (const qmckl_context context);
|
||||
int64_t qmckl_get_ao_basis_prim_num (const qmckl_context context);
|
||||
@ -169,18 +166,21 @@ double* qmckl_get_ao_basis_exponent (const qmckl_context context);
|
||||
double* qmckl_get_ao_basis_coefficient (const qmckl_context context);
|
||||
#+end_src
|
||||
|
||||
When all the data for the AOs have been provided, the following
|
||||
function returns ~true~.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_func)
|
||||
bool qmckl_ao_basis_provided (const qmckl_context context);
|
||||
#+end_src
|
||||
|
||||
#+NAME:post
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
if ( (ctx->ao_basis.uninitialized & mask) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
char qmckl_get_ao_basis_type (const qmckl_context context) {
|
||||
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
@ -405,7 +405,7 @@ qmckl_exit_code qmckl_set_ao_basis_coefficient (qmckl_context context, con
|
||||
#+end_src
|
||||
|
||||
#+NAME:pre2
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
}
|
||||
@ -414,7 +414,7 @@ qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||
#+end_src
|
||||
|
||||
#+NAME:post2
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
ctx->ao_basis.uninitialized &= ~mask;
|
||||
ctx->ao_basis.provided = (ctx->ao_basis.uninitialized == 0);
|
||||
|
||||
@ -422,7 +422,7 @@ return QMCKL_SUCCESS;
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_set_ao_basis_type(qmckl_context context, const char t) {
|
||||
<<pre2>>
|
||||
|
||||
@ -781,19 +781,11 @@ qmckl_exit_code qmckl_set_ao_basis_coefficient(qmckl_context context, const dou
|
||||
|
||||
#+end_src
|
||||
|
||||
** TODO Fortran interfaces
|
||||
|
||||
** Fortran interfaces
|
||||
#+NAME: qmckl_ao_power_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | n | in | Number of values |
|
||||
| double | X[n] | in | Array containing the input values |
|
||||
| int32_t | LMAX[n] | in | Array containing the maximum power for each value |
|
||||
| double | P[n][ldp] | out | Array containing all the powers of ~X~ |
|
||||
| int64_t | ldp | in | Leading dimension of array ~P~ |
|
||||
** Test :noexport:
|
||||
|
||||
** Test
|
||||
|
||||
#+begin_src c :tangle (eval c_test)
|
||||
#+begin_src c :tangle (eval c_test) :exports none :exports none
|
||||
/* Reference input data */
|
||||
|
||||
char typ = 'G';
|
||||
|
@ -81,10 +81,7 @@ typedef struct qmckl_electron_struct {
|
||||
|
||||
** Access functions
|
||||
|
||||
Access to scalars copies the values at the passed address, and
|
||||
for array values a pointer to the array is returned.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_private_func)
|
||||
#+begin_src c :comments org :tangle (eval h_private_func) :exports none
|
||||
int64_t qmckl_get_electron_num (const qmckl_context context);
|
||||
int64_t qmckl_get_electron_up_num (const qmckl_context context);
|
||||
int64_t qmckl_get_electron_down_num (const qmckl_context context);
|
||||
@ -93,18 +90,21 @@ double* qmckl_get_electron_coord_new (const qmckl_context context);
|
||||
double* qmckl_get_electron_coord_old (const qmckl_context context);
|
||||
#+end_src
|
||||
|
||||
When all the data relative to electrons have been set, the
|
||||
following function returns ~true~.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_func)
|
||||
bool qmckl_electron_provided (const qmckl_context context);
|
||||
#+end_src
|
||||
|
||||
#+NAME:post
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
if ( (ctx->electron.uninitialized & mask) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
int64_t qmckl_get_electron_num (const qmckl_context context) {
|
||||
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
@ -209,7 +209,7 @@ qmckl_exit_code qmckl_set_electron_coord (qmckl_context context, const dou
|
||||
#+end_src
|
||||
|
||||
#+NAME:pre2
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_NULL_CONTEXT;
|
||||
}
|
||||
@ -218,7 +218,7 @@ qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||
#+end_src
|
||||
|
||||
#+NAME:post2
|
||||
#+begin_src c
|
||||
#+begin_src c :exports none
|
||||
ctx->electron.uninitialized &= ~mask;
|
||||
ctx->electron.provided = (ctx->electron.uninitialized == 0);
|
||||
|
||||
@ -258,9 +258,9 @@ return QMCKL_SUCCESS;
|
||||
#+end_src
|
||||
|
||||
To set the number of electrons, we give the number of up-spin and
|
||||
down-spin electrons to the context.
|
||||
down-spin electrons to the context and we set the number of walkers.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_set_electron_num(qmckl_context context,
|
||||
const int64_t up_num,
|
||||
const int64_t down_num) {
|
||||
@ -291,9 +291,7 @@ qmckl_exit_code qmckl_set_electron_num(qmckl_context context,
|
||||
#+end_src
|
||||
|
||||
|
||||
Then, we set the number of walkers:
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_set_electron_walk_num(qmckl_context context, const int64_t walk_num) {
|
||||
<<pre2>>
|
||||
|
||||
@ -315,9 +313,10 @@ qmckl_exit_code qmckl_set_electron_walk_num(qmckl_context context, const int64_t
|
||||
The following function sets the electron coordinates of all the
|
||||
walkers. When this is done, the pointers to the old and new sets
|
||||
of coordinates are swapped, and the new coordinates are
|
||||
overwritten.
|
||||
overwritten. This can be done only when the data relative to
|
||||
electrons have been set.
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_set_electron_coord(qmckl_context context, const double* coord) {
|
||||
<<pre2>>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user