construct_type_solver_sparse_crs_bicgstab Module Function

module function construct_type_solver_sparse_crs_bicgstab(N, tolerance, max_iterations, preconditioner) result(structure)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: N
real(kind=real64), intent(in) :: tolerance
integer(kind=int32), intent(in) :: max_iterations
integer(kind=int32), intent(in) :: preconditioner

Return Value class(abst_solver), allocatable


Calls

proc~~construct_type_solver_sparse_crs_bicgstab~~CallsGraph proc~construct_type_solver_sparse_crs_bicgstab construct_type_solver_sparse_crs_bicgstab allocate_array allocate_array proc~construct_type_solver_sparse_crs_bicgstab->allocate_array

Source Code

    module function construct_type_solver_sparse_crs_bicgstab(N, tolerance, max_iterations, preconditioner) result(structure)
        implicit none
        integer(int32), intent(in) :: N
        real(real64), intent(in) :: tolerance
        integer(int32), intent(in) :: max_iterations
        integer(int32), intent(in) :: preconditioner
        class(abst_solver), allocatable :: structure

        allocate (type_solver_sparse_crs_bicgstab :: structure)
        select type (this => structure)
        type is (type_solver_sparse_crs_bicgstab)

            this%N = N
            this%tolerance = tolerance
            this%max_iterations = max_iterations
            this%preconditioner = preconditioner

            ! 配列の確保
            call allocate_array(this%M, this%N)
            call allocate_array(this%p, this%N)
            call allocate_array(this%phat, this%N)
            call allocate_array(this%s, this%N)
            call allocate_array(this%shat, this%N)
            call allocate_array(this%r, this%N)
            call allocate_array(this%r0, this%N)
            call allocate_array(this%t, this%N)
            call allocate_array(this%v, this%N)
            call allocate_array(this%x, this%N)

        end select

    end function construct_type_solver_sparse_crs_bicgstab