mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Add fortran interface
This commit is contained in:
parent
90212829ee
commit
37a408c9dd
@ -1,6 +1,7 @@
|
||||
#+TITLE: Sherman-Morrison-Woodbury
|
||||
#+SETUPFILE: ../tools/theme.setup
|
||||
#+INCLUDE: ../tools/lib.org
|
||||
#+STARTUP: content
|
||||
|
||||
Low- and high-level functions that use the Sherman-Morrison and
|
||||
Woodbury matrix inversion formulas to update the inverse of a
|
||||
@ -95,7 +96,26 @@ int main() {
|
||||
double* Slater_inv );
|
||||
#+end_src
|
||||
|
||||
*** Source
|
||||
*** Fortran source
|
||||
|
||||
#+begin_src c :tangle (eval c) :comments org
|
||||
integer function qmckl_sherman_morrison_f(context, Dim, N_updates, Updates, &
|
||||
Updates_index, breakdown, Slater_inv) result(info)
|
||||
use qmckl
|
||||
implicit none
|
||||
integer(qmckl_context) , intent(in) :: context
|
||||
integer*8 , intent(in) :: Dim, N_updates
|
||||
integer*8 , intent(in) :: Updates_index(N_updates)
|
||||
real*8 , intent(in) :: breakdown
|
||||
real*8 , intent(in) :: Updates(N_updates*Dim)
|
||||
real*8 , intent(inout) :: Slater_inv(Dim*Dim)
|
||||
info = qmckl_sherman_morrison(context, Dim, N_updates, Updates, &
|
||||
Updates_index, breakdown, Slater_inv)
|
||||
)
|
||||
end function qmckl_sherman_morrison_f
|
||||
#+end_src
|
||||
|
||||
*** C source
|
||||
|
||||
#+begin_src c :tangle (eval c) :comments org
|
||||
#include <stdbool.h>
|
||||
@ -169,6 +189,8 @@ qmckl_exit_code qmckl_sherman_morrison_c(const qmckl_context context,
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_sherman_morrison_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
#+CALL: generate_f_interface(table=qmckl_sherman_morrison_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
|
||||
*** Test :noexport:
|
||||
|
Loading…
Reference in New Issue
Block a user