LinearSolverClass Module



Interfaces

public interface BiCGSTAB

  • public subroutine bicgstab_real32(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in) :: a(n,n)
    real(kind=real32), intent(in) :: b(n)
    real(kind=real32), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in) :: itrmax
    real(kind=real32), intent(in) :: er
  • public subroutine bicgstab_real64(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: a(n,n)
    real(kind=real64), intent(in) :: b(n)
    real(kind=real64), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in) :: itrmax
    real(kind=real64), intent(in) :: er
  • public subroutine bicgstab_complex64(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in) :: a(n,n)
    complex(kind=real64), intent(in) :: b(n)
    complex(kind=real64), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in) :: itrmax
    complex(kind=real64), intent(in) :: er

public interface GPBiCG

  • public subroutine GPBiCG_real32(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in) :: a(n,n)
    real(kind=real32), intent(in) :: b(n)
    real(kind=real32), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in), optional :: itrmax
    real(kind=real32), intent(in), optional :: er
  • public subroutine GPBiCG_real64(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: a(n,n)
    real(kind=real64), intent(in) :: b(n)
    real(kind=real64), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in), optional :: itrmax
    real(kind=real64), intent(in), optional :: er
  • public subroutine GPBiCG_complex64(a, b, x, n, itrmax, er)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in) :: a(n,n)
    complex(kind=real64), intent(in) :: b(n)
    complex(kind=real64), intent(inout) :: x(n)
    integer(kind=int32), intent(in) :: n
    integer(kind=int32), intent(in), optional :: itrmax
    complex(kind=real64), intent(in), optional :: er

public interface Gauss_Jordan_PV

  • public subroutine gauss_jordan_pv_real32(a0, x, b, n)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in) :: a0(n,n)
    real(kind=real32), intent(out) :: x(n)
    real(kind=real32), intent(in) :: b(n)
    integer(kind=int32), intent(in) :: n
  • public subroutine gauss_jordan_pv_real64(a0, x, b, n)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: a0(n,n)
    real(kind=real64), intent(inout) :: x(n)
    real(kind=real64), intent(in) :: b(n)
    integer(kind=int32), intent(in) :: n
  • public subroutine gauss_jordan_pv_complex64(a0, x, b, n)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in) :: a0(n,n)
    complex(kind=real64), intent(out) :: x(n)
    complex(kind=real64), intent(in) :: b(n)
    integer(kind=int32), intent(in) :: n

public interface StochasticGradientDescent

  • public function StochasticGradientDescent_scalar_function(fx, training_data_x, training_data_fx, init_params, eta, max_itr, tol, logfile_idx) result(params)

    Arguments

    Type IntentOptional Attributes Name
    public function fx(x, params) result(ret)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: x
    real(kind=real64), intent(in) :: params(:)
    Return Value real(kind=real64)
    real(kind=real64), intent(in) :: training_data_x(:)
    real(kind=real64), intent(in) :: training_data_fx(:)
    real(kind=real64), intent(in) :: init_params(:)
    real(kind=real64), intent(in) :: eta
    integer(kind=int32), intent(in) :: max_itr
    real(kind=real64), intent(in) :: tol
    integer(kind=int32), intent(in), optional :: logfile_idx

    Return Value real(kind=real64), allocatable, (:)

public interface crs_matvec

  • public function crs_matvec_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vector) result(new_vector)

    x_i = A_ij b_j

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: CRS_value(:)
    integer(kind=int32), intent(in) :: CRS_col(:)
    integer(kind=int64), intent(in) :: CRS_row_ptr(:)
    real(kind=real64), intent(in) :: Old_vector(:)

    Return Value real(kind=real64), allocatable, (:)

  • public function crs_matvec_for_CRStype(CRS, Old_vector) result(new_vector)

    Arguments

    Type IntentOptional Attributes Name
    type(CRS_), intent(in) :: CRS
    real(kind=real64), intent(in) :: Old_vector(:)

    Return Value real(kind=real64), allocatable, (:)

public interface sub_crs_matvec

  • public subroutine sub_crs_matvec_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vector, new_vector, precondition)

    x_i = A_ij b_j

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: CRS_value(:)
    integer(kind=int32), intent(in) :: CRS_col(:)
    integer(kind=int64), intent(in) :: CRS_row_ptr(:)
    real(kind=real64), intent(in) :: Old_vector(:)
    real(kind=real64), intent(inout), allocatable :: new_vector(:)
    type(CRS_), intent(in), optional :: precondition
  • public subroutine sub_crs_matvec_for_CRStype(CRS, Old_vector, new_vector, precondition)

    Arguments

    Type IntentOptional Attributes Name
    type(CRS_), intent(in) :: CRS
    real(kind=real64), intent(in) :: Old_vector(:)
    real(kind=real64), intent(inout), allocatable :: new_vector(:)
    type(CRS_), intent(in), optional :: precondition

public interface crs_matmul

  • public function crs_matmul_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vectors) result(new_vectors)

    x_i = A_ij b_j $OMP parallel do default(shared) private(CRS_id,col) $OMP atomic $OMP end parallel do

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: CRS_value(:)
    integer(kind=int32), intent(in) :: CRS_col(:)
    integer(kind=int64), intent(in) :: CRS_row_ptr(:)
    real(kind=real64), intent(in) :: Old_vectors(:,:)

    Return Value real(kind=real64), allocatable, (:,:)

  • public function crs_matmul_for_CRStype(CRS, Old_vectors) result(new_vectors)

    Arguments

    Type IntentOptional Attributes Name
    type(CRS_), intent(in) :: CRS
    real(kind=real64), intent(in) :: Old_vectors(:,:)

    Return Value real(kind=real64), allocatable, (:,:)


Derived Types

type, public ::  LinearSolver_

Components

Type Visibility Attributes Name Initial
real(kind=real64), public, allocatable :: a(:,:)
real(kind=real64), public, allocatable :: b(:)
real(kind=real64), public, allocatable :: x(:)
real(kind=real64), public, allocatable :: a_e(:,:,:)
real(kind=real64), public, allocatable :: b_e(:,:)
real(kind=real64), public, allocatable :: x_e(:,:)
real(kind=real64), public, allocatable :: val(:)
integer(kind=int32), public, allocatable :: index_I(:)
integer(kind=int32), public, allocatable :: index_J(:)
integer(kind=int32), public, allocatable :: row_domain_id(:)
integer(kind=int32), public, allocatable :: column_domain_id(:)
real(kind=real64), public, allocatable :: CRS_val(:)
integer(kind=int64), public, allocatable :: CRS_index_I(:)
integer(kind=int32), public, allocatable :: CRS_index_J(:)
integer(kind=int32), public, allocatable :: CRS_row_domain_id(:)
integer(kind=int32), public, allocatable :: CRS_column_domain_id(:)
integer(kind=int32), public, allocatable :: b_Index_J(:)
integer(kind=int32), public, allocatable :: b_Domain_ID(:)
logical, public, allocatable :: Locked(:)
integer(kind=int32), public, allocatable :: NumberOfNode(:)
integer(kind=int32), public :: DOF = 1
logical, public :: debug = .false.
integer(kind=int32), public, allocatable :: connectivity(:,:)
integer(kind=int32), public :: itrmax = 1000000
integer(kind=int32), public :: currentID = 1
integer(kind=int32), public :: b_currentID = 1
real(kind=real64), public :: er0 = dble(1.0e-10)
logical, public :: ReadyForFix = .false.

Type-Bound Procedures

procedure, public :: init => initLinearSolver
procedure, public :: set => setLinearSolver
procedure, public :: assemble => assembleLinearSolver
procedure, public, pass :: importLinearSolver
procedure, public, pass :: importCRS_LinearSolver
generic, public :: import => importLinearSolver, importCRS_LinearSolver
procedure, public :: fix => fixLinearSolver
procedure, public :: solve => solveLinearSolver
procedure, public :: show => showLinearSolver
procedure, public :: globalMatrix => globalMatrixLinearSolver
procedure, public :: globalVector => globalVectorLinearSolver
procedure, public :: convertCOOtoCRS => convertCOOtoCRSLinearSolver
procedure, public :: matmulCRS => matmulCRSLinearSolver
procedure, public :: matmulCOO => matmulCOOLinearSolver
procedure, public :: prepareFix => prepareFixLinearSolver
procedure, public :: getCOOFormat => getCOOFormatLinearSolver
procedure, public :: exportAsCOO => exportAsCOOLinearSolver
procedure, public :: exportRHS => exportRHSLinearSolver

Functions

public function eigen_3d(tensor) result(eigenvector)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: tensor(3,3)

Return Value real(kind=real64), (3,3)

public function globalMatrixLinearSolver(obj) result(ret)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(in) :: obj

Return Value real(kind=real64), allocatable, (:,:)

public function globalVectorLinearSolver(obj) result(ret)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(in) :: obj

Return Value real(kind=real64), allocatable, (:)

public function matmulCRSLinearSolver(obj, openMP) result(mm)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
logical, intent(in), optional :: openMP

Return Value real(kind=real64), allocatable, (:)

public function matmulCOOLinearSolver(obj, openMP) result(mm)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
logical, intent(in), optional :: openMP

Return Value real(kind=real64), allocatable, (:)

public function fit(f, training_data, params, eta, error, max_itr, use_ratio, logfile, algorithm) result(fit_params)

Arguments

Type IntentOptional Attributes Name
public function f(x, params) result(ret)
Arguments
Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x
real(kind=real64), intent(in) :: params(:)
Return Value real(kind=real64)
real(kind=real64), intent(in) :: training_data(:,:)
real(kind=real64), intent(in) :: params(:)
real(kind=real64), intent(in) :: eta
real(kind=real64), intent(inout), optional :: error
integer(kind=int32), intent(in), optional :: max_itr
real(kind=real64), intent(in), optional :: use_ratio
character(len=*), intent(in), optional :: logfile
character(len=*), intent(in), optional :: algorithm

Return Value real(kind=real64), allocatable, (:)

public function LOBPCG_sparse(A_val, A_col, A_rowptr, lambda_min, tolerance) result(eigen_vectors)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: A_val(:)
integer(kind=int32), intent(in) :: A_col(:)
integer(kind=int64), intent(in) :: A_rowptr(:)
real(kind=real64), intent(inout) :: lambda_min(:)
real(kind=real64), intent(in), optional :: tolerance

Return Value real(kind=real64), allocatable, (:,:)

public function LOBPCG_dense(A, B, lambda_min) result(eigen_vectors)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: A(:,:)
real(kind=real64), intent(in) :: B(:,:)
real(kind=real64), intent(inout) :: lambda_min(:)

Return Value real(kind=real64), allocatable, (:,:)

public function LOBPCG_dense_single(A, B, lambda_min) result(eigen_vector)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: A(:,:)
real(kind=real64), intent(in) :: B(:,:)
real(kind=real64), intent(inout) :: lambda_min

Return Value real(kind=real64), allocatable, (:)

public function crs_matmul_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vectors) result(new_vectors)

x_i = A_ij b_j $OMP parallel do default(shared) private(CRS_id,col) $OMP atomic $OMP end parallel do

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: CRS_value(:)
integer(kind=int32), intent(in) :: CRS_col(:)
integer(kind=int64), intent(in) :: CRS_row_ptr(:)
real(kind=real64), intent(in) :: Old_vectors(:,:)

Return Value real(kind=real64), allocatable, (:,:)

public function crs_matmul_for_CRStype(CRS, Old_vectors) result(new_vectors)

Arguments

Type IntentOptional Attributes Name
type(CRS_), intent(in) :: CRS
real(kind=real64), intent(in) :: Old_vectors(:,:)

Return Value real(kind=real64), allocatable, (:,:)

public function crs_matvec_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vector) result(new_vector)

x_i = A_ij b_j

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: CRS_value(:)
integer(kind=int32), intent(in) :: CRS_col(:)
integer(kind=int64), intent(in) :: CRS_row_ptr(:)
real(kind=real64), intent(in) :: Old_vector(:)

Return Value real(kind=real64), allocatable, (:)

public function crs_matvec_for_CRStype(CRS, Old_vector) result(new_vector)

Arguments

Type IntentOptional Attributes Name
type(CRS_), intent(in) :: CRS
real(kind=real64), intent(in) :: Old_vector(:)

Return Value real(kind=real64), allocatable, (:)

public pure function eyesMatrix(rank1, rank2) result(ret)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: rank1
integer(kind=int32), intent(in) :: rank2

Return Value real(kind=real64), allocatable, (:,:)

public function UpperTriangularMatrix(CRS_val, CRS_col, CRS_rowptr) result(UP)

$OMP atomic

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: CRS_val(:)
integer(kind=int32), intent(in) :: CRS_col(:)
integer(kind=int64), intent(in) :: CRS_rowptr(:)

Return Value real(kind=real64), allocatable, (:)

public function fillby(element, vec_size, num_repeat) result(new_vec)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: element(:)
integer(kind=int32), intent(in), optional :: vec_size
integer(kind=int32), intent(in), optional :: num_repeat

Return Value real(kind=real64), allocatable, (:)

public function unique(old_vec) result(new_vec)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: old_vec(:)

Return Value integer(kind=int32), allocatable, (:)

public function SGD_objective_function(fx, training_data_x, training_data_fx, params) result(ret)

Arguments

Type IntentOptional Attributes Name
public function fx(x, params) result(ret)
Arguments
Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x
real(kind=real64), intent(in) :: params(:)
Return Value real(kind=real64)
real(kind=real64), intent(in) :: training_data_x(:)
real(kind=real64), intent(in) :: training_data_fx(:)
real(kind=real64), intent(in) :: params(:)

Return Value real(kind=real64)

public function StochasticGradientDescent_scalar_function(fx, training_data_x, training_data_fx, init_params, eta, max_itr, tol, logfile_idx) result(params)

Arguments

Type IntentOptional Attributes Name
public function fx(x, params) result(ret)
Arguments
Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x
real(kind=real64), intent(in) :: params(:)
Return Value real(kind=real64)
real(kind=real64), intent(in) :: training_data_x(:)
real(kind=real64), intent(in) :: training_data_fx(:)
real(kind=real64), intent(in) :: init_params(:)
real(kind=real64), intent(in) :: eta
integer(kind=int32), intent(in) :: max_itr
real(kind=real64), intent(in) :: tol
integer(kind=int32), intent(in), optional :: logfile_idx

Return Value real(kind=real64), allocatable, (:)

public function SGD_gradient(fx, training_data_x, training_data_fx, params) result(grad)

Arguments

Type IntentOptional Attributes Name
public function fx(x, params) result(ret)
Arguments
Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x
real(kind=real64), intent(in) :: params(:)
Return Value real(kind=real64)
real(kind=real64), intent(in) :: training_data_x
real(kind=real64), intent(in) :: training_data_fx
real(kind=real64), intent(in) :: params(:)

Return Value real(kind=real64), allocatable, (:)


Subroutines

public subroutine initLinearSolver(obj, NumberOfNode, DOF)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
integer(kind=int32), intent(in), optional :: NumberOfNode(:)
integer(kind=int32), intent(in), optional :: DOF

public recursive subroutine assembleLinearSolver(obj, connectivity, DOF, eMatrix, eVector, DomainIDs)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
integer(kind=int32), intent(in) :: connectivity(:)
integer(kind=int32), intent(in) :: DOF
real(kind=real64), intent(in), optional :: eMatrix(:,:)
real(kind=real64), intent(in), optional :: eVector(:)
integer(kind=int32), intent(in), optional :: DomainIDs(:)

public recursive subroutine fixLinearSolver(obj, nodeid, entryvalue, entryID, DOF, row_DomainID, nodeids, entryvalues, debug)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
integer(kind=int32), intent(in) :: nodeid
real(kind=real64), intent(in) :: entryvalue
integer(kind=int32), intent(in), optional :: entryID
integer(kind=int32), intent(in), optional :: DOF
integer(kind=int32), intent(in), optional :: row_DomainID
integer(kind=int32), intent(in), optional :: nodeids(:)
integer(kind=int32), intent(in), optional :: entryvalues(:)
logical, intent(in), optional :: debug

public recursive subroutine setLinearSolver(obj, low, column, entryvalue, init, row_DomainID, column_DomainID)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
integer(kind=int32), intent(in), optional :: low
integer(kind=int32), intent(in), optional :: column
real(kind=real64), intent(in), optional :: entryvalue
logical, intent(in), optional :: init
integer(kind=int32), intent(in), optional :: row_DomainID
integer(kind=int32), intent(in), optional :: column_DomainID

public subroutine importLinearSolver(obj, a, x, b, a_e, b_e, x_e, connectivity, val, index_I, index_J)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
real(kind=8), intent(in), optional :: a(:,:)
real(kind=8), intent(in), optional :: x(:)
real(kind=8), intent(in), optional :: b(:)
real(kind=8), intent(in), optional :: a_e(:,:,:)
real(kind=8), intent(in), optional :: b_e(:,:)
real(kind=8), intent(in), optional :: x_e(:,:)
integer(kind=int32), intent(in), optional :: connectivity(:,:)
real(kind=8), intent(in), optional :: val(:)
integer(kind=int32), intent(in), optional :: index_I(:)
integer(kind=int32), intent(in), optional :: index_J(:)

public subroutine prepareFixLinearSolver(obj, debug)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
logical, intent(in), optional :: debug

public subroutine solveLinearSolver(obj, Solver, MPI, OpenCL, CUDAC, preconditioning, CRS)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
character(len=*), intent(in) :: Solver
logical, intent(in), optional :: MPI
logical, intent(in), optional :: OpenCL
logical, intent(in), optional :: CUDAC
logical, intent(in), optional :: preconditioning
logical, intent(in), optional :: CRS

public subroutine gauss_seidel(a, b, x, n, itrmax, er0)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(out) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er0

public subroutine GaussJordan_COO(a0, index_i, index_j, x, b)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a0(:)
integer(kind=int32), intent(in) :: index_i(:)
integer(kind=int32), intent(in) :: index_j(:)
real(kind=real64), intent(inout), allocatable :: x(:)
real(kind=real64), intent(in) :: b(:)

public subroutine gauss_jordan_pv_real64(a0, x, b, n)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a0(n,n)
real(kind=real64), intent(inout) :: x(n)
real(kind=real64), intent(in) :: b(n)
integer(kind=int32), intent(in) :: n

public subroutine gauss_jordan_pv_real32(a0, x, b, n)

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: a0(n,n)
real(kind=real32), intent(out) :: x(n)
real(kind=real32), intent(in) :: b(n)
integer(kind=int32), intent(in) :: n

public subroutine gauss_jordan_pv_complex64(a0, x, b, n)

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in) :: a0(n,n)
complex(kind=real64), intent(out) :: x(n)
complex(kind=real64), intent(in) :: b(n)
integer(kind=int32), intent(in) :: n

public subroutine bicgstab_diffusion(a, b, x, n, itrmax, er, DBC, DBCVal)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er
integer(kind=int32), intent(in) :: DBC(:,:)
real(kind=real64), intent(in) :: DBCVal(:,:)

public subroutine bicgstab_CRS(a, ptr_i, index_j, x, b, itrmax, er, debug)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: a(:)
integer(kind=int64), intent(inout) :: ptr_i(:)
integer(kind=int32), intent(inout) :: index_j(:)
real(kind=real64), intent(inout) :: x(:)
real(kind=real64), intent(inout) :: b(:)
integer(kind=int32), intent(inout) :: itrmax
real(kind=real64), intent(inout) :: er
logical, intent(in), optional :: debug

public subroutine bicgstab_COO(a, index_i, index_j, x, b, itrmax, er, debug, locked)

$OMP parallel do private(i) $OMP end parallel do $OMP parallel do reduction(+:y) private(i) $OMP end parallel do

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: a(:)
integer(kind=int32), intent(inout) :: index_i(:)
integer(kind=int32), intent(inout) :: index_j(:)
real(kind=real64), intent(inout) :: x(:)
real(kind=real64), intent(inout) :: b(:)
integer(kind=int32), intent(inout) :: itrmax
real(kind=real64), intent(inout) :: er
logical, intent(in), optional :: debug
logical, intent(in), optional :: locked(:)

public subroutine bicgstab_real64(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er

public subroutine bicgstab_real32(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: a(n,n)
real(kind=real32), intent(in) :: b(n)
real(kind=real32), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real32), intent(in) :: er

public subroutine bicgstab_complex64(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in) :: a(n,n)
complex(kind=real64), intent(in) :: b(n)
complex(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
complex(kind=real64), intent(in) :: er

public subroutine bicgstab1d(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er

public subroutine bicgstab_nr(a, b, x, n, itrmax, er, u_nod_x, u_nod_y)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er
integer(kind=int32), intent(in) :: u_nod_x(:)
integer(kind=int32), intent(in) :: u_nod_y(:)

public subroutine bicgstab_nr1(a, b, x, n, itrmax, er, u_nod_x, u_nod_y, u_nod_dis_x, u_nod_dis_y)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er
integer(kind=int32), intent(in) :: u_nod_x(:)
integer(kind=int32), intent(in) :: u_nod_y(:)
real(kind=real64), intent(in) :: u_nod_dis_x(:)
real(kind=real64), intent(in) :: u_nod_dis_y(:)

public subroutine bicgstab_dirichlet(a, b, x, n, itrmax, er, DBoundNodID, DBoundVal, SetBC)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: itrmax
real(kind=real64), intent(in) :: er
integer(kind=int32), intent(in) :: DBoundNodID(:,:)
real(kind=real64), intent(in) :: DBoundVal(:,:)
integer(kind=int32), intent(in) :: SetBC

public subroutine modify_residual_1(r, x, u_nod_x, u_nod_y, u_nod_dis_x, u_nod_dis_y)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: r(:)
real(kind=real64), intent(inout) :: x(:)
integer(kind=int32), intent(in) :: u_nod_x(:)
integer(kind=int32), intent(in) :: u_nod_y(:)
real(kind=real64), intent(in) :: u_nod_dis_x(:)
real(kind=real64), intent(in) :: u_nod_dis_y(:)

public subroutine modify_residual(r, u_nod_x, u_nod_y)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: r(:)
integer(kind=int32), intent(in) :: u_nod_x(:)
integer(kind=int32), intent(in) :: u_nod_y(:)

public subroutine modify_residual_dirichlet(r, x, DBoundNodID, DBoundVal, SetBC)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: r(:)
real(kind=real64), intent(inout) :: x(:)
integer(kind=int32), intent(in) :: DBoundNodID(:,:)
real(kind=real64), intent(in) :: DBoundVal(:,:)
integer(kind=int32), intent(in) :: SetBC

public subroutine GPBiCG_real64(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(n,n)
real(kind=real64), intent(in) :: b(n)
real(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in), optional :: itrmax
real(kind=real64), intent(in), optional :: er

public subroutine GPBiCG_real32(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: a(n,n)
real(kind=real32), intent(in) :: b(n)
real(kind=real32), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in), optional :: itrmax
real(kind=real32), intent(in), optional :: er

public subroutine GPBiCG_complex64(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in) :: a(n,n)
complex(kind=real64), intent(in) :: b(n)
complex(kind=real64), intent(inout) :: x(n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in), optional :: itrmax
complex(kind=real64), intent(in), optional :: er

public subroutine preconditioned_GPBiCG(a, b, x, n, itrmax, er)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a(1:n,1:n)
real(kind=real64), intent(in) :: b(1:n)
real(kind=real64), intent(inout) :: x(1:n)
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in), optional :: itrmax
real(kind=real64), intent(in), optional :: er

public subroutine icres(L, d, r, u, n)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: L(1:n,1:n)
real(kind=real64), intent(inout) :: d(1:n)
real(kind=real64), intent(inout) :: r(1:n)
real(kind=real64), intent(inout) :: u(1:n)
integer(kind=int32), intent(in) :: n

public subroutine showLinearSolver(obj)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(in) :: obj

public subroutine convertCOOtoCRSLinearSolver(obj, OpenMP)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
logical, intent(in), optional :: OpenMP

public subroutine getCOOFormatLinearSolver(obj)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj

public subroutine exportAsCOOLinearSolver(obj, name)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
character(len=*), intent(in) :: name

public subroutine exportRHSLinearSolver(obj, name)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: obj
character(len=*), intent(in) :: name

public subroutine gram_real(m, n, mat_v, mat_v_out)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: m
integer, intent(in) :: n
real(kind=8), intent(in) :: mat_v(1:m,1:n)
real(kind=8), intent(out) :: mat_v_out(1:m,1:n)

public subroutine to_Dense(CRS_val, CRS_col, CRS_rowptr, DenseMatrix)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), allocatable :: CRS_val(:)
integer(kind=int32), intent(in), allocatable :: CRS_col(:)
integer(kind=int64), intent(in), allocatable :: CRS_rowptr(:)
real(kind=real64), intent(inout), allocatable :: DenseMatrix(:,:)

public subroutine sub_crs_matvec_generic(CRS_value, CRS_col, CRS_row_ptr, Old_vector, new_vector, precondition)

x_i = A_ij b_j

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: CRS_value(:)
integer(kind=int32), intent(in) :: CRS_col(:)
integer(kind=int64), intent(in) :: CRS_row_ptr(:)
real(kind=real64), intent(in) :: Old_vector(:)
real(kind=real64), intent(inout), allocatable :: new_vector(:)
type(CRS_), intent(in), optional :: precondition

public subroutine sub_crs_matvec_for_CRStype(CRS, Old_vector, new_vector, precondition)

Arguments

Type IntentOptional Attributes Name
type(CRS_), intent(in) :: CRS
real(kind=real64), intent(in) :: Old_vector(:)
real(kind=real64), intent(inout), allocatable :: new_vector(:)
type(CRS_), intent(in), optional :: precondition

public subroutine reduce_crs_matrix(CRS_val, CRS_col, CRS_rowptr, remove_IDs)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), allocatable :: CRS_val(:)
integer(kind=int32), intent(inout), allocatable :: CRS_col(:)
integer(kind=int64), intent(inout), allocatable :: CRS_rowptr(:)
integer(kind=int32), intent(in) :: remove_IDs(:)

public subroutine Lanczos(A, V, T)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: A(:,:)
real(kind=real64), intent(inout), allocatable :: V(:,:)
real(kind=real64), intent(inout), allocatable :: T(:,:)

public subroutine PBiCGSTAB_CRS(CRS, x, b, itrmax, er, relative_er, debug, ILU_MATRIX)

Arguments

Type IntentOptional Attributes Name
type(CRS_), intent(inout) :: CRS
real(kind=real64), intent(inout) :: x(:)
real(kind=real64), intent(inout) :: b(:)
integer(kind=int32), intent(inout) :: itrmax
real(kind=real64), intent(inout) :: er
real(kind=real64), intent(in), optional :: relative_er
logical, intent(in), optional :: debug
type(CRS_), intent(inout), optional :: ILU_MATRIX

public subroutine bicgstab_CRS_ILU(a, ptr_i, index_j, x, b, itrmax, er, relative_er, debug, ILU_MATRIX)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout) :: a(:)
integer(kind=int64), intent(inout) :: ptr_i(:)
integer(kind=int32), intent(inout) :: index_j(:)
real(kind=real64), intent(inout) :: x(:)
real(kind=real64), intent(inout) :: b(:)
integer(kind=int32), intent(inout) :: itrmax
real(kind=real64), intent(inout) :: er
real(kind=real64), intent(in), optional :: relative_er
logical, intent(in), optional :: debug
type(CRS_), intent(inout), optional :: ILU_MATRIX

public subroutine importCRS_LinearSolver(this, CRS)

Arguments

Type IntentOptional Attributes Name
class(LinearSolver_), intent(inout) :: this
type(CRS_), intent(in) :: CRS