func3 Function

public function func3(x) result(f)

Arguments

Type IntentOptional Attributes Name
complex(kind=rk), intent(in), dimension(:) :: x

Return Value complex(kind=rk), dimension(:), allocatable


Source Code

   function func3(x) result(f)
      complex(rk), dimension(:), intent(in)  :: x
      complex(rk), dimension(:), allocatable :: f

      allocate(f(3))

      f(1) = x(1)**2 + 0.5_rk*x(2)**2
      f(2) = x(1)**3 + 0.5_rk*x(2)**3
      f(3) = x(1)**4 + 0.5_rk*x(2)**4

   end function func3