dot-rxDiscreteForwardSens: Discrete forward sensitivity of a fixed-step RK4 solve

.rxDiscreteForwardSensR Documentation

Discrete forward sensitivity of a fixed-step RK4 solve

Description

Integrates the state and its exact derivative S = dX/dtheta through the RK4 map, storing the stages for the discrete adjoint.

Usage

.rxDiscreteForwardSens(build, X0, params, h, nStep, doses = NULL, S0 = NULL)

Arguments

build

object from .rxDiscreteAdjointBuild().

X0

named numeric initial state (order = build$st).

params

named numeric parameter vector.

h

fixed step size.

nStep

number of RK4 steps (final time ⁠= h * nStep⁠).

doses

optional list of additive-bolus dose specs, each ⁠list(step = <0-based grid step>, cmt = <state name>, amt = <numeric>)⁠; applied (with bioavailability f(cmt) if defined) at the start of the step.

S0

optional initial sensitivity (⁠ns x np⁠); default zero.

Value

list with XN, SN (⁠ns x np⁠), Sall (per-step S), stages.

Author(s)

Matthew L. Fidler


rxode2 documentation built on July 28, 2026, 5:08 p.m.