| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(lambda_obj_err), | intent(inout) | :: | self | |||
| real(kind=DP), | intent(in), | dimension(:) | :: | x |
function lambda_eval_0_err(self, x) result(y)
implicit none
! Arguments
class(lambda_obj_err), intent(inout) :: self
real(DP), dimension(:), intent(in) :: x
! Result
real(DP) :: y
if (associated(self%lambdaptr_err)) then
y = self%lambdaptr_err(x, self%lerr)
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_err