Skip to content
/ forinv Public

ForInv - A Fortran library for inverse and pseudo-inverse calculations.

License

Notifications You must be signed in to change notification settings

gha3mi/forinv

Repository files navigation

GitHub Version Documentation License Build

ForInv

ForInv: A Fortran library for inverse and pseudo-inverse calculations.

Requirements

To use the forinv module, you need the following:

  • Fortran compiler
  • LAPACK or MKL

fpm dependency

If you want to use ForInv as a dependency in your own fpm project, you can easily include it by adding the following line to your fpm.toml file:

[dependencies]
forinv = {git="https://github.com/gha3mi/forinv.git"}

Usage

Here is an example of how to use the forinv module in your Fortran code:

program main

   use kinds
   use forinv, only: inv

   implicit none

   ! Declare variables
   real(rk), dimension(:, :), allocatable :: A, A_inv

   ! Initialize matrix A
   ...

   ! Call pseudoinverse function
   A_inv = inv(A)

end program main

How to run tests and examples

Clone the repository:

You can clone the ForInv repository from GitHub using the following command:

git clone https://github.com/gha3mi/forinv.git
cd forinv

Run tests:

To set the stack size to unlimited, use the following command: ulimit -s unlimited.

fpm @gfortran-test
fpm @ifort-test
fpm @ifx-test
fpm @nvfortran-test

API documentation

The most up-to-date API documentation for the master branch is available here. To generate the API documentation for ForInv using ford run the following command:

ford ford.yml

Contributing

Contributions to ForInv are welcome! If you find any issues or would like to suggest improvements, please open an issue.