Return to the he3lib page...
How to install
-
Download and unpack sources of the library.
You can also use git program to get sources
(git clone https://github.com/slazav/he3lib), then you can update
the library easily by git pull, see changes by git log etc.
- Build the library, using make program. You need C and Fortran
compilers for that.
There is also a simple script make.bat for those
who have problems with make.
- If needed, build matlad/octave files by running make octave,
make matlab or make matlab64. You need matlab/octave
program for this. Compiled functions will be available in
the matlab/ folder.
You can also start matlab/octave and run compile.m script
located in the matlab/ folder.
How to use
The library can be used with different programming languages
(Fortran, C, Matlab/Octave) and via a command-line interface.
Example programs and scripts can be found in the examples/ folder.
- Fortran-77.
You should use he3.fh include file and libhe3 library for
Fortran-77 programs. All functions and arguments are real*8.
Use -fno-range-check compiler flag to allow NaN values.
- Fortran-90. Usage of the library in Fortran-90 programs is
similar to that in Fortran-77, but you should use he3.f90h include
file.
- C. You should use he3.h include file and libhe3
library in C programs. Lowercase names with underscore should be used
(like he3_pf_). Type of arguments is always double*,
type of returned value is double.
- Matlab, Octave. mex files are located in the
matlab folder. Lowercase names should be used. In function
arguments you can mix numbers with arrays or matrices of the same size.
For example the command "fB = he3_nu_b(0:0.1:1, 0);" will give
you Leggett frequency vs temperature at zero pressure.
To build mex files you should run make octave, make
matlab or make matlab64. Note, that fixed rpath is used
for the library.
- Command line.You can use all the functions via a
command-line program he3. To get a list of all functions run
the program without arguments. To get information about specific
function, run the program with the function name as an argument. You can
use matlab-style vectors "value1:step:value2" to get a table of values
(if step is missing then 20 points will be printed): the command "he3
he3_nu_b 0.1:0.1:1 0" will give you Leggett frequency vs
temperature at zero pressure.
- Web interface. There is a simple web-server which runs
the he3 command-line program. For example try the following link
to get s-wave BCS gap $\Delta_\mbox{bcs}/T_c$ as a function of $T/T_c$:
http://slazav.xyz/cgi/he3?he3_bcsgap 0:0.05:1
Example programs and scripts can be found in the examples/ folder.
Acknowledgements
This library have been done in collaboration with my colleagues in Low
temperature laboratory (Aalto University, Finland): P.Heikkinen, S.Autti,
V.Eltsov, M.Krusius and G.Volovik. Other $^3$He programs and libraries
have been used in the work: programs by V.Dmitriev (Kapitza institute,
Moscow), S.Autti, $^3$He-B texture library by J.Kopu, programs by
E.Thuneberg.