Package jline.solvers.fluid
Class FluidInterp
java.lang.Object
jline.solvers.fluid.FluidInterp
Clamped piecewise-linear interpolation of a vector-valued trajectory.
This is the shared time-varying-input evaluator of the fluid solver, used
both by the trajectory-based iteration (TBI) transient, which reads the
frozen complement trajectory of a cell, and by the time-varying rate
multiplier of the closing ODE (FluidRateMultiplier).
It mirrors MATLAB fluid_interpcols.m, transposed to the row-major
(one row per time point) layout used throughout the Java fluid code: MATLAB
samples a quantity in the columns of a matrix, here each row y[j] is
the sample at time t[j].
Times outside [t[0], t[n-1]] are clamped to the boundary rows
(zero-order hold outside the grid).
-
Method Summary
Modifier and TypeMethodDescriptionstatic double[]interp(double[] t, double[][] y, double tq, int dim) Interpolates the trajectory(t, y)at timetq.
-
Method Details
-
interp
public static double[] interp(double[] t, double[][] y, double tq, int dim) Interpolates the trajectory(t, y)at timetq.- Parameters:
t- strictly increasing time grid, length ny- n rows of dimension at leastdim, row j sampled at t[j]tq- query timedim- number of components to return- Returns:
- the interpolated (clamped) row, of length
dim
-