Return error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_lcce), | intent(in) | :: | self | Integrand. |
||
real(kind=R_P), | intent(in) | :: | t | Time. |
||
real(kind=R_P), | intent(in), | optional | :: | t0 | Initial time. |
|
class(integrand_object), | intent(in), | optional | :: | U0 | Initial conditions. |
Error.
pure function error(self, t, t0, U0)
!< Return error.
class(integrand_lcce), intent(in) :: self !< Integrand.
real(R_P), intent(in) :: t !< Time.
real(R_P), intent(in), optional :: t0 !< Initial time.
class(integrand_object), intent(in), optional :: U0 !< Initial conditions.
real(R_P), allocatable :: error(:) !< Error.
allocate(error(1:1))
error = abs([self%U] - self%exact_solution(t=t, t0=t0))
endfunction error