construct_type_solver_sparse_crs_lu Module Function

module function construct_type_solver_sparse_crs_lu(N, MAXFCT, MNUM, MTYPE, PHASE, NRHS, MSGVLV, A) result(structure)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: N
integer(kind=int32), intent(in) :: MAXFCT
integer(kind=int32), intent(in) :: MNUM
integer(kind=int32), intent(in) :: MTYPE
integer(kind=int32), intent(in) :: PHASE
integer(kind=int32), intent(in) :: NRHS
integer(kind=int32), intent(in) :: MSGVLV
type(type_crs), intent(in) :: A

Return Value class(abst_solver), allocatable


Calls

proc~~construct_type_solver_sparse_crs_lu~~CallsGraph proc~construct_type_solver_sparse_crs_lu construct_type_solver_sparse_crs_lu ia ia proc~construct_type_solver_sparse_crs_lu->ia ind ind proc~construct_type_solver_sparse_crs_lu->ind iparm iparm proc~construct_type_solver_sparse_crs_lu->iparm ja ja proc~construct_type_solver_sparse_crs_lu->ja pardisoinit pardisoinit proc~construct_type_solver_sparse_crs_lu->pardisoinit perm perm proc~construct_type_solver_sparse_crs_lu->perm ptr ptr proc~construct_type_solver_sparse_crs_lu->ptr

Source Code

    module function construct_type_solver_sparse_crs_lu(N, MAXFCT, MNUM, MTYPE, PHASE, NRHS, MSGVLV, A) result(structure)
        implicit none
        integer(int32), intent(in) :: N
        integer(int32), intent(in) :: MAXFCT
        integer(int32), intent(in) :: MNUM
        integer(int32), intent(in) :: MTYPE
        integer(int32), intent(in) :: PHASE
        integer(int32), intent(in) :: NRHS
        integer(int32), intent(in) :: MSGVLV
        type(type_crs), intent(in) :: A

        class(abst_solver), allocatable :: structure

        integer(int32) :: i

        allocate (type_solver_sparse_crs_lu :: structure)
        select type (this => structure)
        type is (type_solver_sparse_crs_lu)
            this%N = transfer(N, this%N)
            this%MAXFCT = transfer(MAXFCT, this%MAXFCT)
            this%MNUM = transfer(MNUM, this%MNUM)
            this%MTYPE = transfer(MTYPE, this%MTYPE)
            this%PHASE = transfer(PHASE, this%PHASE)
            this%NRHS = transfer(NRHS, this%NRHS)
            this%MSGLVL = transfer(MSGVLV, this%MSGLVL)
            allocate (this%PERM(N))
            allocate (this%JA(A%nnz))
            allocate (this%IA(A%num_ptr))

            this%IPARM(:) = 0
            call PARDISOINIT(this%PT, this%MTYPE, this%IPARM)

            do i = 1, A%nnz
                this%JA(i) = transfer(A%Ind(i), this%JA(i))
            end do
            do i = 1, A%num_ptr
                this%IA(i) = transfer(A%Ptr(i), this%IA(i))
            end do
        end select

    end function construct_type_solver_sparse_crs_lu