type_iteration Derived Type

type, public :: type_iteration


Inherits

type~~type_iteration~~InheritsGraph type~type_iteration type_iteration type~type_iterator_config type_iterator_config type~type_iteration->type~type_iterator_config config type~type_convergence type_convergence type~type_iterator_config->type~type_convergence convergence type~type_convergence_criteria type_convergence_criteria type~type_convergence->type~type_convergence_criteria residual, update

Inherited by

type~~type_iteration~~InheritedByGraph type~type_iteration type_iteration type~type_controls type_controls type~type_controls->type~type_iteration iteration type~type_ftdss type_ftdss type~type_ftdss->type~type_controls controls

Components

Type Visibility Attributes Name Initial
character(len=:), private, allocatable :: algorithm
type(type_iterator_config), private :: config
real(kind=real64), private :: init_res_norm_inf = 0.0d0
real(kind=real64), private :: init_res_norm_l2 = 0.0d0
real(kind=real64), private :: init_upd_norm_inf = 0.0d0
real(kind=real64), private :: init_upd_norm_l2 = 0.0d0
logical, private :: is_converged = .false.
integer(kind=int32), private :: iter = 0
integer(kind=int32), private :: step = 0

Type-Bound Procedures

procedure, public, pass(self) :: check_convergence

  • private subroutine check_convergence(self, res_vec, upd_vec)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(inout) :: self
    real(kind=real64), intent(in) :: res_vec(:)
    real(kind=real64), intent(in) :: upd_vec(:)

procedure, public, pass(self) :: get_algorithm_name

  • private pure function get_algorithm_name(self) result(algorithm_name)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(in) :: self

    Return Value character(len=:), allocatable

procedure, public, pass(self) :: get_iter

  • private pure function get_iter(self) result(iter)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(in) :: self

    Return Value integer(kind=int32)

procedure, public, pass(self) :: get_step

  • private pure function get_step(self) result(step)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(in) :: self

    Return Value integer(kind=int32)

procedure, public, pass(self) :: has_converged => get_status

  • private pure function get_status(self) result(is_converged)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(in) :: self

    Return Value logical

procedure, public, pass(self) :: increment_iter

procedure, public, pass(self) :: increment_step

procedure, public, pass(self) :: initialize => initialize_type_iteration

procedure, public, pass(self) :: reset_step

  • private subroutine reset_step(self)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(inout) :: self

procedure, public, pass(self) :: reset_timestep

procedure, public, pass(self) :: set_initial_norms

  • private subroutine set_initial_norms(self, res_vec, upd_vec)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(inout) :: self
    real(kind=real64), intent(in), optional :: res_vec(:)
    real(kind=real64), intent(in), optional :: upd_vec(:)

procedure, public, pass(self) :: should_continue => continue_loop

  • private function continue_loop(self) result(should_continue_loop)

    Arguments

    Type IntentOptional Attributes Name
    class(type_iteration), intent(in) :: self

    Return Value logical

Source Code

    type :: type_iteration
        private
        integer(int32) :: iter = 0 ! 非線形反復回数
        integer(int32) :: step = 0 ! ステップカウンタ
        logical :: is_converged = .false.

        real(real64) :: init_res_norm_l2 = 0.0d0
        real(real64) :: init_res_norm_inf = 0.0d0
        real(real64) :: init_upd_norm_l2 = 0.0d0
        real(real64) :: init_upd_norm_inf = 0.0d0

        character(:), allocatable :: algorithm
        type(type_iterator_config) :: config
    contains
        procedure, pass(self), public :: initialize => initialize_type_iteration
        procedure, pass(self), public :: reset_step
        procedure, pass(self), public :: set_initial_norms
        procedure, pass(self), public :: reset_timestep
        procedure, pass(self), public :: check_convergence
        procedure, pass(self), public :: increment_iter
        procedure, pass(self), public :: increment_step
        procedure, pass(self), public :: should_continue => continue_loop
        procedure, pass(self), public :: get_iter
        procedure, pass(self), public :: get_step
        procedure, pass(self), public :: get_algorithm_name
        procedure, pass(self), public :: has_converged => get_status
    end type type_iteration