shamrock.math#

Shamrock math library.

Functions

derivative_3point_backward

derivative_3point_forward

derivative_5point_midpoint

derivative_centered

derivative_upwind

estim_deriv_step

Estim the correct step to use for a given order when using derivatives

euler_ode

Solve ODE with Euler method start : Lower bound of integration end : Higher bound of integration step : Step of integration ode : Ode function x0 : Initial coordinate u0 : Initial value

get_ideal_hcp_box

get_identity_f64_4x4

get_periodic_hcp_box

Get the periodic box corresponding to integer lattice coordinates this function will throw if the coordinates asked cannot make a periodic lattice

least_squares

Fit data with a given function by least squares method f: Function (1d values) X: $x$ Data to fit Y: $y$ Data to fit p0: Initial parameters estimated

mat_mul

mat_set_identity

Classes