assert_close_c64_1 Subroutine

private subroutine assert_close_c64_1(this, c1, c2)

Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.

Type Bound

tester_t

Arguments

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

The tester.

complex(kind=real64), intent(in), dimension(:) :: c1

Value to compare.

complex(kind=real64), intent(in), dimension(:) :: c2

Value to compare.


Called by

proc~~assert_close_c64_1~~CalledByGraph proc~assert_close_c64_1 tester::tester_t%assert_close_c64_1 none~assert_close tester::tester_t%assert_close none~assert_close->proc~assert_close_c64_1 program~test_tester_1 test_tester_1 program~test_tester_1->none~assert_close program~test_tester_1~2 test_tester_1 program~test_tester_1~2->none~assert_close program~test_tester_6 test_tester_6 program~test_tester_6->none~assert_close

Source Code

  subroutine assert_close_c64_1(this, c1, c2)
    class(tester_t), intent(inout)            :: this !< The tester.
    complex(real64), intent(in), dimension(:) :: c1   !< Value to compare.
    complex(real64), intent(in), dimension(:) :: c2   !< Value to compare.

    this% n_tests = this% n_tests + 1

    if ( size(c1) .ne. size(c2) ) then
       this% n_errors = this% n_errors + 1
    else
       if ( maxval(abs(c1-c2)) > this% tolerance64 ) then
          this% n_errors = this% n_errors + 1
       end if
    end if

  end subroutine assert_close_c64_1