init Subroutine

private subroutine init(this, tolerance32, tolerance64)

Initialize the tester.

Type Bound

tester_t

Arguments

Type IntentOptional Attributes Name
class(tester_t), intent(out) :: this

The tester.

real(kind=real32), intent(in), optional :: tolerance32

Real tolerance, 32 bits.

real(kind=real64), intent(in), optional :: tolerance64

Real tolerance, 64 bits.


Called by

proc~~init~2~~CalledByGraph proc~init~2 tester::tester_t%init program~flap_test_group flap_test_group program~flap_test_group->proc~init~2 program~test_tester_05 test_tester_05 program~test_tester_05->proc~init~2 program~test_tester_1 test_tester_1 program~test_tester_1->proc~init~2 program~test_tester_1~2 test_tester_1 program~test_tester_1~2->proc~init~2 program~test_tester_2 test_tester_2 program~test_tester_2->proc~init~2 program~test_tester_3 test_tester_3 program~test_tester_3->proc~init~2 program~test_tester_4 test_tester_4 program~test_tester_4->proc~init~2 program~test_tester_6 test_tester_6 program~test_tester_6->proc~init~2 program~test_tester_7 test_tester_7 program~test_tester_7->proc~init~2 program~test_tester_8 test_tester_8 program~test_tester_8->proc~init~2

Source Code

  subroutine init(this, tolerance32, tolerance64)
    class(tester_t), intent(out)          :: this        !< The tester.
    real(real32),    intent(in), optional :: tolerance32 !< Real tolerance, 32 bits.
    real(real64),    intent(in), optional :: tolerance64 !< Real tolerance, 64 bits.

    this% n_errors = 0
    this% n_tests = 0

    if (present(tolerance64)) then
       this% tolerance64 = tolerance64
    else
       this% tolerance64 = 2._real64*epsilon(1._real64)
    end if

    if (present(tolerance32)) then
       this% tolerance32 = tolerance32
    else
       this% tolerance32 = 2._real32*epsilon(1._real32)
    end if

  end subroutine init