porepy.numerics.ad.time_derivatives module
The module contains functionality for time-differentiation of operator trees.
- The module contains the following functions:
dt: Take the time derivative of an operator tree (first-order approximation). time_increment: Find the time increment of an operator tree.
- dt(op, time_step)[source]
Approximate the time-derivative of an operator tree.
This time derivative is obtained by taking a first-order finite difference.
The operator tree at the previous time step is created as a shallow copy, and will thus be identical to the original operator, except that all time dependent operators are evaluated at the previous time step.
If the time-dependent quantity q is already evaluated at the previous time step, its derivative will be defined as (q(time=n-1) - q(time=n-1)) / dt = 0.