square.f90 Source File

Files Dependent On This One

sourcefile~~square.f90~~AfferentGraph sourcefile~square.f90 square.f90 sourcefile~main_ex.f90 main_ex.f90 sourcefile~square.f90->sourcefile~main_ex.f90 sourcefile~external.f90 external.f90 sourcefile~square.f90->sourcefile~external.f90 sourcefile~main.f90 main.f90 sourcefile~square.f90->sourcefile~main.f90 sourcefile~external_ex.f90 external_ex.f90 sourcefile~square.f90->sourcefile~external_ex.f90 sourcefile~external.f90->sourcefile~main.f90 sourcefile~external_ex.f90->sourcefile~main_ex.f90
Help

Source Code


Source Code

module square
  use iso_fortran_env, only: wp => real64
  implicit none

  interface
    function fun_interf(x) result(y)
      import wp
      real(wp), intent(in), dimension(:)  :: x
      real(wp),             dimension(size(x))  :: y
    end function
  end interface

contains

  function square_local(x) result(y)
    real(wp), intent(in), dimension(:)  :: x
    real(wp),             dimension(size(x))  :: y

    y = squareFun(x)

    return
  end function square_local

  function squareFun(x) result(y)
    real(wp), intent(in), dimension(:)  :: x
    real(wp),             dimension(size(x))  :: y

    y = x * x

    return
  end function squareFun

end module square