pic_test_helpers Module

simple reusable helpers for random things


Uses

  • module~~pic_test_helpers~~UsesGraph module~pic_test_helpers pic_test_helpers module~pic_global_definitions pic_global_definitions module~pic_test_helpers->module~pic_global_definitions module~pic_types pic_types module~pic_test_helpers->module~pic_types module~pic_global_definitions->module~pic_types iso_fortran_env iso_fortran_env module~pic_types->iso_fortran_env

Interfaces

public interface is_equal

The is equal interface is used to circumvent the fact that Fortran, rightfully, complains about comparing two reals without involving a tolerance, i.e. if(a == b) since there is no guarantee that the two reals are exactly equal due to floating point precision issues. The functions are defined as elemental

Usage: if (is_equal(a, b)) then where a and b are real numbers, and the function will return true if they are equal within the tolerance defined in pic_global_definitions.

  • private elemental function is_equal_sp(a, b) result(res)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=sp), intent(in) :: a
    real(kind=sp), intent(in) :: b

    Return Value logical

  • private elemental function is_equal_dp(a, b) result(res)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: a
    real(kind=dp), intent(in) :: b

    Return Value logical


Functions

private elemental function is_equal_dp(a, b) result(res)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b

Return Value logical

private elemental function is_equal_sp(a, b) result(res)

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: a
real(kind=sp), intent(in) :: b

Return Value logical


Subroutines

public subroutine dummy_work()

this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely

Read more…

Arguments

None