FSAIPACK Documentation  vers. 1.0
class_FSAIP_Prec Module Reference

Data type to store a preconditioner as a pair of linked lists of CSR matrices. More...

List of all members.

Data Types

type  CSR_node
 Typical node of the linked list of CSR matrices. More...
type  FSAIP_Prec
 Data type for the preconditioner. More...

Public Member Functions

integer function, public append_LEFT (CSR_in, PREC_list)
 Appends a CSR matrix at the end of the LEFT list.
integer function, public append_RIGHT (CSR_in, PREC_list)
 Appends a CSR matrix at the beginning of the RIGHT list.
integer function, public delete_LEFT (Content_Flag, PREC_list)
 Deletes the LEFT list.
integer function, public delete_RIGHT (Content_Flag, PREC_list)
 Deletes the RIGHT list.
integer function, public dlt_FSAIP_Prec (Content_Flag, PREC_list)
 Deletes the FSAIPACK preconditioner.
subroutine, public wr_FSAIP_Prec (LEFT_flag, RIGHT_flag, PREC)
 Prints the FSAIPACK preconditioner in a sequence of files.
subroutine, public apply_FSAIP_Prec (nrows, firstrow, PREC, vec, WR1, WR2, pvec)
 Applies the FSAIPACK preconditioner to a vector.
subroutine, public getdata_FSAIP_Prec (PREC, nrows, nnz_L, nnz_R)
 Gets data from the preconditioner.

Detailed Description

Data type to store a preconditioner as a pair of linked lists of CSR matrices.

This module is used to create, store, apply and destroy the FSAIP_Prec data type. The preconditioner is stored as a pair of linked lists of CSR matrices. The first list, called LEFT, stores the left preconditioners [Fn]....[F2][F1], the second list, called RIGHT, stores the right preconditioners [F1^T][F2^T]....[Fn^T]. The preconditioned matrix is then: [Fn]....[F2][F1] [A] [F1^T]....[F2^T][F1^T], and the preconditioner is applied to a vector as:

pvec = [F1^T][F2^T]....[Fn^T] [Fn]....[F2][F1] vec.

Note: It is possible to use this data structure also with other preconditioners than those computed in the FSAIPACK. In such cases it is not needed that the CSR matrices in the RIGHT part are the Transpose of those in the LEFT and even their number may differ.

Author:
Carlo Janna
Version:
1.0
Date:
February 2013
License:
This program is intended for internal research only and can not be distributed elsewhere without authors' consent.

Member Function/Subroutine Documentation

integer function, public class_FSAIP_Prec::append_LEFT ( type(CSRMAT), intent(in), target  CSR_in,
type(FSAIP_Prec), intent(inout)  PREC_list 
)

Appends a CSR matrix at the end of the LEFT list.

Author:
Carlo Janna
Parameters:
[in]CSR_inmatrix to be appended
inout]PREC_list list of left preconditioners
[out]ierrerror code
==0, successful allocation
/=0, allocation error
Version:
1.0
Date:
February 2013
integer function, public class_FSAIP_Prec::append_RIGHT ( type(CSRMAT), intent(in), target  CSR_in,
type(FSAIP_Prec), intent(inout)  PREC_list 
)

Appends a CSR matrix at the beginning of the RIGHT list.

Author:
Carlo Janna
Parameters:
[in]CSR_inmatrix to be appended
inout]PREC_list list of right preconditioners
[out]ierrerror code
==0, successful allocation
/=0, allocation error
Version:
1.0
Date:
February 2013
subroutine, public class_FSAIP_Prec::apply_FSAIP_Prec ( integer, intent(in)  nrows,
integer, intent(in)  firstrow,
type(FSAIP_Prec), intent(in)  PREC,
real(kind=double), dimension(:), intent(in)  vec,
real(kind=double), dimension(:), intent(out), target  WR1,
real(kind=double), dimension(:), intent(out), target  WR2,
real(kind=double), dimension(:), intent(out), target  pvec 
)

Applies the FSAIPACK preconditioner to a vector.

Author:
Carlo Janna
Parameters:
[in]nrows# of rows of the current stripe
[in]firstrowfirst row of the current stripe
[in]PRECFSAIPACK preconditioner
[in]vecvector to which the preconditioner is applied (local size)
[out]pvecpreconditioned vector (local size)
[out]WRscratch array (global size)
Version:
1.0
Date:
February 2013

Here is the call graph for this function:

integer function, public class_FSAIP_Prec::delete_LEFT ( logical, intent(in)  Content_Flag,
type(FSAIP_Prec), intent(inout)  PREC_list 
)

Deletes the LEFT list.

Author:
Carlo Janna
Parameters:
[in]Content_Flag\n
.True.,deletethe list and its content
.False.,deletethe list only
inout]PREC_list list of left preconditioners to be deleted
[out]ierrerror code
==0, successful allocation
/=0, allocation error
Version:
1.0
Date:
February 2013
integer function, public class_FSAIP_Prec::delete_RIGHT ( logical, intent(in)  Content_Flag,
type(FSAIP_Prec), intent(inout)  PREC_list 
)

Deletes the RIGHT list.

Author:
Carlo Janna
Parameters:
[in]Content_Flag\n
.True.,deletethe list and its content
.False.,deletethe list only
inout]PREC_list list of left preconditioners to be deleted
[out]ierrerror code
==0, successful allocation
/=0, allocation error
Version:
1.0
Date:
February 2013
integer function, public class_FSAIP_Prec::dlt_FSAIP_Prec ( logical, intent(in)  Content_Flag,
type(FSAIP_Prec), intent(inout)  PREC_list 
)

Deletes the FSAIPACK preconditioner.

Author:
Carlo Janna
Parameters:
[in]Content_Flag\n
.True.,deletethe list and its content
.False.,deletethe list only
inout]PREC_list FSAIPACK preconditioner
[out]ierrerror code
==0, successful allocation
/=0, allocation error
Version:
1.0
Date:
February 2013
subroutine, public class_FSAIP_Prec::getdata_FSAIP_Prec ( type(FSAIP_Prec), intent(in)  PREC,
integer, intent(out)  nrows,
integer, intent(out)  nnz_L,
integer, intent(out)  nnz_R 
)

Gets data from the preconditioner.

Author:
Carlo Janna
Parameters:
[in]PRECpreconditioner to get data from
[out]nrows> 0 ---> # of rows of the preconditioner
=0 ---> there is no preconditioner stored
<0 ---> inconsistency between the parts of the preconditioner
[out]nnz_L# of non-zeroes of the left preconditioner
[out]nnz_R# of non-zeroes of the right preconditioner
Version:
1.0
Date:
February 2013
subroutine, public class_FSAIP_Prec::wr_FSAIP_Prec ( logical, intent(in)  LEFT_flag,
logical, intent(in)  RIGHT_flag,
type(FSAIP_Prec), intent(in)  PREC 
)

Prints the FSAIPACK preconditioner in a sequence of files.

Author:
Carlo Janna
Parameters:
[in]PRECpreconditioner to print
[in]LEFT_flagflag to print or not the left part
[in]RIGHT_flagflag to print or not the right part
Version:
1.0
Date:
February 2013

The documentation for this module was generated from the following file:
 All Classes Files Functions Variables