| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(lambda_obj), | intent(inout) | :: | self | |||
| real(kind=DP), | intent(in), | dimension(:) | :: | x |
function lambda_eval_0(self, x) result(y) implicit none ! Arguments class(lambda_obj), intent(inout) :: self real(DP), dimension(:), intent(in) :: x ! Result real(DP) :: y if (associated(self%lambdaptr)) then y = self%lambdaptr(x) self%lastval = y if (allocated(self%lastarg)) deallocate(self%lastarg) allocate(self%lastarg, source=x) else stop "Lambda function was not initialized" end if end function lambda_eval_0