UniformFiniteDifferencer#
- class UniformFiniteDifferencer(time_domain, scheme: str = 'ord4')[source]#
Time derivative estimation with finite differences for state snapshots spaced uniformly in time.
- Parameters:
- time_domain(k,) ndarray
Time domain corresponding to the snapshot data. This class requires uniformly spaced time domains, see
NonuniformFiniteDifferencer
for non-uniform domains.- schemestr
Finite difference scheme to use. Options:
'fwd1'
: first-order forward differences, seefwd1()
.'fwd2'
: second-order forward differences, seefwd2()
.'fwd3'
: third-order forward differences, seefwd3()
.'fwd4'
: fourth-order forward differences, seefwd4()
.'fwd5'
: fifth-order forward differences, seefwd5()
.'fwd6'
: sixth-order forward differences, seefwd6()
.'bwd1'
: first-order backward differences, seebwd1()
.'bwd2'
: second-order backward differences, seebwd2()
.'bwd3'
: third-order backward differences, seebwd3()
.'bwd4'
: fourth-order backward differences, seebwd4()
.'bwd5'
: fifth-order backward differences, seebwd5()
.'bwd6'
: sixth-order backward differences, seebwd6()
.'ctr2'
: second-order backward differences, seectr2()
.'ctr4'
: fourth-order backward differences, seectr4()
.'ctr6'
: sixth-order backward differences, seectr6()
.'ord2'
: second-order differences, seeord2()
.'ord4'
: fourth-order differences, seeord4()
.'ord6'
: sixth-order differences, seeord6()
.
Properties:- dt#
Time step.
- scheme#
Finite difference engine.
- time_domain#
Time domain of the snapshot data, a (k,) ndarray.
Methods:Estimate the first time derivatives of the states using finite differences.
Map an array from the training time domain to the domain of the estimated time derivatives.
Verify that
estimate()
is consistent in the sense that the all outputs have the same number of columns and test the accuracy of the results on a few test problems.Verify that
estimate()
is consistent in the sense that the all outputs have the same number of columns.