Lis (linear algebra library)

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Lis (linear algebra library)
Irises screen 1.jpg
Stable release 1.5.65 / March 19, 2016 (2016-03-19)
Development status Active
Operating system Cross-platform
Available in C, Fortran
Type Software library
License New BSD License
Website www.ssisc.org/lis/

Lis (Library of Iterative Solvers for linear systems, pronounced [lis]) is a scalable parallel software library for solving linear equations and eigenvalue problems that arise in the numerical solution of partial differential equations using iterative methods.[1][2][3]

Features

Lis provides facilities for:

Example

A C program to solve the linear equation Ax=b is written as follows:

#include <stdio.h>
#include "lis_config.h"
#include "lis.h"

LIS_INT main(LIS_INT argc, char* argv[])
{
  LIS_MATRIX  A;
  LIS_VECTOR  b, x;
  LIS_SOLVER  solver;
  LIS_INT     iter;
  double      time;

  lis_initialize(&argc, &argv);

  lis_matrix_create(LIS_COMM_WORLD, &A);
  lis_vector_create(LIS_COMM_WORLD, &b);
  lis_vector_create(LIS_COMM_WORLD, &x);

  lis_input_matrix(A, argv[1]);
  lis_input_vector(b, argv[2]);
  lis_vector_duplicate(A, &x);

  lis_solver_create(&solver);
  lis_solver_set_optionC(solver);
  lis_solve(A, b, x, solver);

  lis_solver_get_iter(solver, &iter);
  lis_solver_get_time(solver, &time);
  printf("number of iterations = %d\n", iter);
  printf("elapsed time = %e\n", time);

  lis_output_vector(x, LIS_FMT_MM, argv[3]);

  lis_solver_destroy(solver);
  lis_matrix_destroy(A);
  lis_vector_destroy(b);
  lis_vector_destroy(x);

  lis_finalize();

  return 0;
}

System requirements

The installation of Lis requires a C compiler. The Fortran interface requires a Fortran compiler, and the algebraic multigrid preconditioner requires a Fortran 90 compiler.[4] For parallel computing environments, an OpenMP or MPI library is used. Both the Harwell-Boeing and Matrix Market formats are supported to import and export user data.

Packages that use Lis

See also

References

<templatestyles src="Reflist/styles.css" />

Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />

External links

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.