1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-06-30 00:44:52 +02:00

Merge branch 'master' of github.com:TREX-CoE/qmckl

This commit is contained in:
Anthony Scemama 2021-09-21 09:56:13 +02:00
commit 3f0b8414ec
3 changed files with 1313 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,6 +7,7 @@ qmckl_nucleus.org
qmckl_electron.org
qmckl_ao.org
qmckl_jastrow.org
qmckl_sherman_morrison_woodbury.org
qmckl_distance.org
qmckl_utils.org
qmckl_tests.org

View File

@ -11,11 +11,10 @@
** Function to get the value of a property.
#+NAME: get_value
#+begin_src elisp :var key="Type"
(setq x (org-property-values key))
(pop x)
(org-with-point-at org-babel-current-src-block-location
(org-entry-get nil key t))
#+end_src
#+RESULTS: get_value
** Table of function arguments
@ -42,6 +41,8 @@ f_of_c_d = { '' : ''
, 'qmckl_exit_code' : 'integer (c_int32_t)'
, 'int32_t' : 'integer (c_int32_t)'
, 'int64_t' : 'integer (c_int64_t)'
, 'uint32_t' : 'integer (c_int32_t)'
, 'uint64_t' : 'integer (c_int64_t)'
, 'float' : 'real (c_float )'
, 'double' : 'real (c_double )'
, 'char' : 'character'
@ -55,6 +56,8 @@ ctypeid_d = { '' : ''
, 'qmckl_exit_code' : 'integer(c_int32_t)'
, 'integer' : 'integer(c_int32_t)'
, 'integer*8' : 'integer(c_int64_t)'
, 'integer' : 'integer(c_uint32_t)'
, 'integer*8' : 'integer(c_uint64_t)'
, 'real' : 'real(c_float)'
, 'real*8' : 'real(c_double)'
, 'character' : 'character(c_char)'
@ -184,23 +187,6 @@ results='\n'.join(results)
return results
#+END_SRC
#+RESULTS: generate_c_interface
#+begin_src f90 :tangle (eval f) :comments org :exports none
integer(c_int32_t) function [] &
() &
bind(C) result(info)
use, intrinsic :: iso_c_binding
implicit none
integer(c_int32_t), external :: []_f
info = []_f &
()
end function []
#+end_src
*** Generates a Fortran interface to the C function
#+NAME: generate_f_interface
@ -252,8 +238,5 @@ results='\n'.join(results)
return results
#+END_SRC
#+RESULTS: generate_f_interface
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
#+end_src