Skip to contents

DEStats() and NLStats() are the statistics objects of differential equation and nonlinear solutions (sol$stats holds the same counters). FunctionArgumentsError(nargs), TooFewArgumentsError(nargs), TooManyArgumentsError(nargs) and KeywordArgError(kw) are the condition objects SciMLBase signals for functions with the wrong signature or unknown keywords; numargs(f) is the number of arguments of f. DEFAULT_PROB_FUNC, DEFAULT_OUTPUT_FUNC and DEFAULT_REDUCTION are the defaults of EnsembleProblem(); generate_sim_seeds(n) draws n seeds and default_rng_func(seed) seeds the generator. WeightedEnsembleProblem(probs, weights) combines several ensemble problems with weights that sum to one (a mixture of ensembles); solve() returns a WeightedEnsembleSolution with the solution of each ensemble in u and the weights in weights. calculate_ensemble_errors(sim) summarizes calculate_solution_errors() over an ensemble.

Usage

DEStats(nf = 0L, njacs = 0L, nsolve = 0L, nw = 0L, naccept = 0L, nreject = 0L)

NLStats(nf = 0L, njacs = 0L, nfactorizations = 0L, nsolve = 0L, nsteps = 0L)

FunctionArgumentsError(nargs)

TooFewArgumentsError(nargs)

TooManyArgumentsError(nargs)

KeywordArgError(kw)

numargs(f)

DEFAULT_PROB_FUNC(prob, i, repeat_)

DEFAULT_OUTPUT_FUNC(sol, i)

DEFAULT_REDUCTION(u, data, I)

generate_sim_seeds(n, seed = NULL)

default_rng_func(seed)

WeightedEnsembleProblem(probs, weights)

WeightedEnsembleSolution(u, weights)

calculate_ensemble_errors(sim, ...)

Arguments

nf, njacs, nfactorizations, nsolve, nsteps, naccept, nreject, nw

Counters.

nargs, kw

Number of arguments or keyword name.

f

A function.

prob, i, repeat_, sol, u, data, I

Arguments of the ensemble functions.

n

Number of seeds.

seed

A seed.

probs

A list of ensemble problems.

weights

Their weights.

sim

An ensemble solution.

...

Options.

Value

A statistics object, a condition, a count, a value or a problem.

Examples

numargs(function(u, p, t) u)
#> [1] 3
DEStats(nf = 10L)
#> $nf
#> [1] 10
#> 
#> $njacs
#> [1] 0
#> 
#> $nsolve
#> [1] 0
#> 
#> $nw
#> [1] 0
#> 
#> $naccept
#> [1] 0
#> 
#> $nreject
#> [1] 0
#> 
#> attr(,"class")
#> [1] "DEStats"