![]() |
FSAIPACK Documentation
vers. 1.0
|
Data type to store a preconditioner as a pair of linked lists of CSR matrices. More...
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. | |
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.
| 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.
| [in] | CSR_in | matrix to be appended |
| inout] | PREC_list list of left preconditioners | |
| [out] | ierr | error code |
| == | 0, successful allocation | |
| /= | 0, allocation error |
| 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.
| [in] | CSR_in | matrix to be appended |
| inout] | PREC_list list of right preconditioners | |
| [out] | ierr | error code |
| == | 0, successful allocation | |
| /= | 0, allocation error |
| 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.
| [in] | nrows | # of rows of the current stripe |
| [in] | firstrow | first row of the current stripe |
| [in] | PREC | FSAIPACK preconditioner |
| [in] | vec | vector to which the preconditioner is applied (local size) |
| [out] | pvec | preconditioned vector (local size) |
| [out] | WR | scratch array (global size) |

| integer function, public class_FSAIP_Prec::delete_LEFT | ( | logical, intent(in) | Content_Flag, |
| type(FSAIP_Prec), intent(inout) | PREC_list | ||
| ) |
Deletes the LEFT list.
| [in] | Content_Flag\n | |
| .True.,delete | the list and its content | |
| .False.,delete | the list only | |
| inout] | PREC_list list of left preconditioners to be deleted | |
| [out] | ierr | error code |
| == | 0, successful allocation | |
| /= | 0, allocation error |
| integer function, public class_FSAIP_Prec::delete_RIGHT | ( | logical, intent(in) | Content_Flag, |
| type(FSAIP_Prec), intent(inout) | PREC_list | ||
| ) |
Deletes the RIGHT list.
| [in] | Content_Flag\n | |
| .True.,delete | the list and its content | |
| .False.,delete | the list only | |
| inout] | PREC_list list of left preconditioners to be deleted | |
| [out] | ierr | error code |
| == | 0, successful allocation | |
| /= | 0, allocation error |
| 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.
| [in] | Content_Flag\n | |
| .True.,delete | the list and its content | |
| .False.,delete | the list only | |
| inout] | PREC_list FSAIPACK preconditioner | |
| [out] | ierr | error code |
| == | 0, successful allocation | |
| /= | 0, allocation error |
| 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.
| [in] | PREC | preconditioner 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 |
| 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.
| [in] | PREC | preconditioner to print |
| [in] | LEFT_flag | flag to print or not the left part |
| [in] | RIGHT_flag | flag to print or not the right part |