Wrapper for exporting points during integration.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rk_class), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | t | |||
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
logical, | intent(in), | optional | :: | first_or_last |
if this is the first or last point (always reported) |
subroutine export_point(me,t,x,first_or_last) class(rk_class),intent(inout) :: me real(wp),intent(in) :: t real(wp),dimension(:),intent(in) :: x logical,intent(in),optional :: first_or_last !! if this is the first or !! last point (always reported) logical :: export !! if the point is to be exported if (associated(me%report) .and. me%report_rate > 0) then export = .false. if (present(first_or_last)) then ! always report first and last step if (first_or_last) export = .true. end if if (.not. export) then ! report steps at user-specified rate export = modulo(me%num_steps, me%report_rate) == 0 end if if (export) call me%report(t,x) end if end subroutine export_point