Git Product home page Git Product logo

mumfpack_sparse's Introduction

mUMFPACK Sparse Matrix Solver Example (Fortran 2003)

The mUMFPACK module provides a Fortran-2003 implementation of the full UMFPACK interface.

There are three parts in this program.

  • Create Sparse Triplet (ST) Matrix File, using ST_IO
  • Read the ST file and Converse it to Compressed Column (CC) format, using ST_TO_CC
  • mUMFPACK provides a high-level operator .umfpack., just one line can solve the sparse matrix instead of using umf4sym, umf4num so that saving memory from creating arrays.

Quickstart

Dependancies

To get started, you will need to install suitesparse. You can use homebrew to install it in your Mac. You also need to build ST_IO and ST_TO_CC library in your search path.

brew install suitesparse

Compile

gfortran umfpack.f90 sparse.f90 -lst_io -lst_to_cc -lcc_io -lumfpack -lamd -lcholmod -lcolamd -lsuitesparseconfig -lblas -o sparse

Run

$ ./sparse 
Sparse Triplet (ST) header information:

Minimum row index I_MIN =        1
Maximum row index I_MAX =        5
Minimum col index J_MIN =        1
Maximum col index J_MAX =        5
Number of rows        M =        5
Number of columns     N =        5
Number of nonzeros  NST =       12

Number of CC values =   12

The CC matrix:
  #     I     J         A
----  ----  ----  ----------------

  0     0     0     2.0000000
  1     1     0     3.0000000
  2     0     1     3.0000000
  3     2     1    -1.0000000
  4     4     1     4.0000000
  5     1     2     4.0000000
  6     2     2    -3.0000000
  7     3     2     1.0000000
  8     4     2     2.0000000
  9     2     3     2.0000000
 10     1     4     6.0000000
 11     4     4     1.0000000

High-level Fortran operator (.umfpack.), CSC allocatable operands
x (1) = 1.0000000000
x (2) = 2.0000000000
x (3) = 3.0000000000
x (4) = 4.0000000000
x (5) = 5.0000000000

mumfpack_sparse's People

Contributors

xiaji avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.