PostStepHook_Model Subroutine

public subroutine PostStepHook_Model(this)

PostStepHook is a template routine invoked by the time integrators once immediately after each completed time step (after this%t has advanced by this%dt). The default implementation is a no-op.

Override through type-extension to perform lightweight per-step work that must stay inside the native time-stepping loop -- e.g. recording receiver samples from a device-resident solution -- without driving the integrator one step at a time from the host (which would otherwise incur the entropy/diagnostic device-to-host copies of ForwardStep).

Arguments

TypeIntentOptionalAttributesName
class(Model), intent(inout) :: this

Contents

Source Code


Source Code

  subroutine PostStepHook_Model(this)
    !! PostStepHook is a template routine invoked by the time integrators once
    !! immediately after each completed time step (after this%t has advanced by
    !! this%dt). The default implementation is a no-op.
    !!
    !! Override through type-extension to perform lightweight per-step work that
    !! must stay inside the native time-stepping loop -- e.g. recording receiver
    !! samples from a device-resident solution -- without driving the integrator
    !! one step at a time from the host (which would otherwise incur the
    !! entropy/diagnostic device-to-host copies of ForwardStep).
    implicit none
    class(Model),intent(inout) :: this

    if(.false.) this%nvar = this%nvar ! suppress unused-dummy-argument warning

  endsubroutine PostStepHook_Model