solver Module

Api for different sparse matrix solvers

Warning

If WITH_MA48 has been set to true, you are supposed to have the license for the HSL MA48 use. By default the HSL MA48 are not provided here.


Uses

  • module~~solver~~UsesGraph module~solver solver hsl_ma48_double hsl_ma48_double module~solver->hsl_ma48_double iso_c_binding iso_c_binding module~solver->iso_c_binding iso_fortran_env iso_fortran_env module~solver->iso_fortran_env module~data_arch data_arch module~solver->module~data_arch module~gen_param gen_param module~solver->module~gen_param module~mumfpack mumfpack module~solver->module~mumfpack module~mumps_wrapper mumps_wrapper module~solver->module~mumps_wrapper module~sort_arrays sort_arrays module~solver->module~sort_arrays module~sulu_wrapper sulu_wrapper module~solver->module~sulu_wrapper module~data_arch->iso_fortran_env module~gen_param->module~data_arch module~mumfpack->iso_c_binding module~sort_arrays->module~data_arch module~sulu_wrapper->iso_c_binding

Used by

  • module~~solver~~UsedByGraph module~solver solver program~test_solvers test_solvers program~test_solvers->module~solver

Variables

Type Visibility Attributes Name Initial
integer(kind=I4), private, parameter :: MA48 = 0

code for Ma48 solver type

integer(kind=I4), public, parameter :: MUMP = 2

code for MUMPS solver type

integer(kind=I4), public :: SOLVER_BS = -1

solver used for bottom scale grids [not used by the present module]

integer(kind=I4), public :: SOLVER_TS = -1

solver used for top scale grids [not used by the present module]

integer(kind=I4), public, parameter :: SULU = 1

code for SUPER LU solver type

integer(kind=I4), public, parameter :: UMFP = 3

code for UMFPACK solver type


Derived Types

type, private ::  MAT_MA48

All the stuff needed by HSL_MA48

Components

Type Visibility Attributes Name Initial
type(MA48_AINFO), public :: ainf
type(MA48_CONTROL), public :: ctrl
type(MA48_FACTORS), public :: fact
integer(kind=I4), public :: fast
type(MA48_FINFO), public :: finf
real(kind=R8), public, dimension(2) :: resid
type(MA48_SINFO), public :: sinf
type(ZD11_TYPE), public :: zmat

type, private ::  MAT_MA48

type, public ::  MAT_SOLV

MUSST high level system type

Components

Type Visibility Attributes Name Initial
real(kind=R8), public, dimension(:), allocatable :: a_elt

unassembled rigidity matrix

logical(kind=I4), public :: ana = .false.

the system is analyzed

real(kind=R8), public, dimension(:), allocatable :: b

right hand side vector

integer(kind=I4), public :: code

error code [not used yet]

integer(kind=I4), public, dimension(:), allocatable :: eltptr

element rows pointer

integer(kind=I4), public, dimension(:), allocatable :: eltvar

rows in assembled matrix

logical(kind=I4), public :: end = .false.

the system is closed

real(kind=R8), public :: error

error value [not used yet]

logical(kind=I4), public :: fac = .false.

the system is factorized

logical(kind=I4), public :: fre = .false.

the system is freed

logical(kind=I4), public :: ini = .false.

the system is initialized

integer(kind=I4), public, dimension(:), allocatable :: irow

line number

integer(kind=I4), public, dimension(:), allocatable :: jcol

column number

integer(kind=I4), public, dimension(:), allocatable :: jptr

line pointer

type(MAT_MA48), public :: matma48

matrices for ma48 solver

type(MAT_MUMP), public :: matmump

matrices for mumps solver

type(MAT_SULU), public :: matsulu

matrices for SuperLu solver

type(MAT_UMFP), public :: matumfp

matrices for Umfpack solver

character(len=1024), public :: mess

message [not used yet]

integer(kind=I4), public :: ne

number of elements

integer(kind=I4), public :: nn

number of nodes

integer(kind=I4), public :: nt

number of a priori non-zero terms in the matrix

integer(kind=I4), public :: nvar

eltvar length ( if 4-nodes elt -> 2 lines X number of elemental matrices)

integer(kind=I4), public :: nz

number of non-zero terms in the matrix

integer(kind=I4), public :: slv_t

solver type

logical(kind=I4), public :: sol = .false.

the system is solved

real(kind=R8), public, dimension(:), allocatable :: x

unknwon vector

type, private ::  MAT_UMFP

All the stuff needed by UMFPACK

Components

Type Visibility Attributes Name Initial
real(kind=R8), public, dimension(0:UMFPACK_CONTROL-1) :: c_control
real(kind=R8), public, dimension(0:UMFPACK_INFO -1) :: c_info
type(c_ptr), public :: c_numeric
type(c_ptr), public :: c_symbolic

type, public ::  MS_MAT_SOLV

MUSST multiscale high level solver type

Components

Type Visibility Attributes Name Initial
type(MAT_SOLV), public, dimension(:), allocatable :: bs_mat

bottom-scale solver type matrices (table)

type(MAT_SOLV), public :: ts_mat

top-scale solver type matrices


Subroutines

private subroutine analyse_solver(mat)

Subroutine to analyse, factorize (symbolic) the matrix of the system

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout), target :: mat

high level system type

private subroutine close_solver(mat)

Subroutine to close the solver

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout) :: mat

high level system type

public subroutine convert_matrice_format(mat)

Compressed Column Storage (CCS) is also called the Harwell-Boeing sparse matrix format.

Read more…

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout), target :: mat

high level system type

private subroutine factorize_solver(mat)

Subroutine to factorize the matrix of the system

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout) :: mat

high level system type

private subroutine freefact_solver(mat)

Subroutine to free the factors if applicable

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout) :: mat

high level system type

private subroutine from_elemental_to_assembled(mat)

Subroutine to transform the elemental entries into assembled CC vectors

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout), target :: mat

high level system type

private subroutine init_solver(mat)

Subroutine to initialize the matrices of the solver

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout) :: mat

high level system type

private subroutine solution_solver(mat)

Subroutine to solve the system (sparse A)

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout), target :: mat

high level system type

public subroutine solve_syst(mat, step)

General hat subroutine that handles the resolution steps:

Read more…

Arguments

Type IntentOptional Attributes Name
type(MAT_SOLV), intent(inout) :: mat

high level system type

character(len=*), intent(in) :: step

‘ini’=initialize, ‘ana’=analyze, ‘fac’=factorize, ‘sol’=solve, ‘fre’=free memory, ‘end’=close solver