Documentation ¶
Index ¶
- Variables
- func Plot(dirout, fn string, res *Results, yfcn Cb_ycorr, xa, xb float64, ...)
- func SimpleOutput(first bool, dx, x float64, y []float64, args ...interface{}) (err error)
- func WcAnalysis(dirout, fnkey, method string, fcn Cb_fcn, jac Cb_jac, M *la.Triplet, ...)
- type Cb_fcn
- type Cb_jac
- type Cb_out
- type Cb_ycorr
- type ERKdat
- type R5cte
- type Results
- type Solver
- func (o *Solver) GetStat() (s string)
- func (o *Solver) Init(method string, ndim int, fcn Cb_fcn, jac Cb_jac, M *la.Triplet, out Cb_out, ...)
- func (o *Solver) SetTol(atol, rtol float64)
- func (o *Solver) Solve(y []float64, x, xb, Δx float64, fixstp bool, args ...interface{}) (err error)
- func (o *Solver) Stat()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Modified-Euler 2(1), order=2, error_est_order=2, nstages=2 ME2_a = [][]float64{{0.0, 0.0}, {1.0, 0.0}} ME2_b = []float64{1.0, 0.0} ME2_be = []float64{0.5, 0.5} ME2_c = []float64{0.0, 1.0} // Dormand-Prince 5(4), order=5, error_est_order=4, nstages=7 DP5_a = [][]float64{{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {1.0 / 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {3.0 / 40.0, 9.0 / 40.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {44.0 / 45.0, -56.0 / 15.0, 32.0 / 9.0, 0.0, 0.0, 0.0, 0.0}, {19372.0 / 6561.0, -25360.0 / 2187.0, 64448.0 / 6561.0, -212.0 / 729.0, 0.0, 0.0, 0.0}, {9017.0 / 3168.0, -355.0 / 33.0, 46732.0 / 5247.0, 49.0 / 176.0, -5103.0 / 18656.0, 0.0, 0.0}, {35.0 / 384.0, 0.0, 500.0 / 1113.0, 125.0 / 192.0, -2187.0 / 6784.0, 11.0 / 84.0, 0.0}} DP5_b = []float64{35.0 / 384.0, 0.0, 500.0 / 1113.0, 125.0 / 192.0, -2187.0 / 6784.0, 11.0 / 84.0, 0.0} DP5_be = []float64{5179.0 / 57600.0, 0.0, 7571.0 / 16695.0, 393.0 / 640.0, -92097.0 / 339200.0, 187.0 / 2100.0, 1.0 / 40.0} DP5_c = []float64{0.0, 1.0 / 5.0, 3.0 / 10.0, 4.0 / 5.0, 8.0 / 9.0, 1.0, 1.0} )
constants
Functions ¶
func Plot ¶
func Plot(dirout, fn string, res *Results, yfcn Cb_ycorr, xa, xb float64, argsAna, argsNum string, extra func())
Plot plot results
func SimpleOutput ¶
SimpleOutput implements a simple output function
Types ¶
type Results ¶
type Results struct { Method string // method name Dx []float64 // step sizes [Noutput] X []float64 // x values [Noutput] Y [][]float64 // y values [ndim][Noutput] }
Results structure to hold numerical results
type Solver ¶
type Solver struct { ZeroTrial bool // always start iterations with zero trial values (instead of collocation interpolation) Atol float64 // absolute tolerance Rtol float64 // relative tolerance IniH float64 // initial H NmaxIt int // max num iterations (allowed) NmaxSS int // max num substeps Mmin float64 // min step multiplier Mmax float64 // max step multiplier Mfac float64 // step multiplier factor PredCtrl bool // use Gustafsson's predictive controller C1h float64 // c1 of HW-VII p124 => min ratio to retain previous h C2h float64 // c2 of HW-VII p124 => max ratio to retain previous h LerrStrat int // strategy to select local error computation method Pll bool // parallel (threaded) execution CteTg bool // use constant tangent (Jacobian) in BwEuler UseRmsNorm bool // use RMS norm instead of Euclidian in BwEuler Verbose bool // be more verbose, e.g. during iterations // derived variables Distr bool // MPI distributed execution. automatically set ON in Init if mpi is on and there are more then one processor. // contains filtered or unexported fields }
Solver implements an ODE solver
Note: Distr is automatically set ON by Init if mpi is on and there are more then one processor. However, it can be set OFF after calling Init.
func (*Solver) Init ¶
func (o *Solver) Init(method string, ndim int, fcn Cb_fcn, jac Cb_jac, M *la.Triplet, out Cb_out, silent bool)
Init initialises ODE structure with default values and allocate slices
func (*Solver) SetTol ¶
SetTol sets tolerances according to Hairer and Wanner suggestions. This routine also checks for consistent values and only considers the case of scalars Atol and Rtol.
Click to show internal directories.
Click to hide internal directories.