Difference between revisions of "Common C, C++, FORTRAN Libraries"

From PHYSpedia
Jump to: navigation, search
(Special Functions)
(Linear Algebra)
Line 3: Line 3:
  
 
= Linear Algebra =
 
= Linear Algebra =
 +
==Eigen==
  
 +
[http://eigen.tuxfamily.org Eigen] is linear algebra library that supports computing the eigenvalue and eigenvectors of real and complex matrices. It is relatively simple to use because it is a pure template library, and therefore does not require you to compile anything in the library to use it. All you need to do is download the library and tell your compiler where it is.
 +
 +
===Using===
 +
Let's assume you have a C++ program called StationaryStateFinder that you
 +
===Downloading===
 +
Download the latest version of the library from http://eigen.tuxfamily.org. On the right side of the page, you should see "The latest stable release...". Click on the tar.bz2 (Linux and Mac), tar.gz (Linux and Mac), or zip (Windows) links.
 +
 +
===Installing===
 +
To "install" eigen, you only need to unpack the archive file (tar.bz2, tar.gz, or zip) and then tell you compiler where you unpacked it. The following instructions will explain how to use the eigen library for a <em>single</em> project. It will not install the library system wide.
 +
 +
===Unpacking===
 +
Let's assume you have a C++ program that you are
  
 
== BLAS under Linux ==
 
== BLAS under Linux ==

Revision as of 12:22, 23 March 2014

There are a number of common libraries for computational physics and numerical analysis. Here are a few links for tutorials and information for installation of commonly-used tools.


Linear Algebra

Eigen

Eigen is linear algebra library that supports computing the eigenvalue and eigenvectors of real and complex matrices. It is relatively simple to use because it is a pure template library, and therefore does not require you to compile anything in the library to use it. All you need to do is download the library and tell your compiler where it is.

Using

Let's assume you have a C++ program called StationaryStateFinder that you

Downloading

Download the latest version of the library from http://eigen.tuxfamily.org. On the right side of the page, you should see "The latest stable release...". Click on the tar.bz2 (Linux and Mac), tar.gz (Linux and Mac), or zip (Windows) links.

Installing

To "install" eigen, you only need to unpack the archive file (tar.bz2, tar.gz, or zip) and then tell you compiler where you unpacked it. The following instructions will explain how to use the eigen library for a single project. It will not install the library system wide.

Unpacking

Let's assume you have a C++ program that you are

BLAS under Linux

BLAS stands for "Basic Linear Algebra Subprograms". Originally written in FORTRAN in the late 70's, it is still used by many libraries to do "low level" linear algebra operations. It is still the standard by which the performance of all other linear algebra libraries are measured.

Linear Algebra in Linux (BLAS/LAPACK)

Setting up BLAS in Linux (yum-based systems)

Matrix Multiplication with BLAS and CBLAS

GSL BLAS Examples (such as matrix multiply)

Special Functions

GNU Scientific Library(GSL)

The GSL also has calls for C and C++ for a variety of linear algebra functions found in BLAS and other packages.

The Boost Math Toolkit has several utilities for doing various types of mathematical operations including several special functions.

Utilities