Functions

CommonSolve.solveMethod
function solve(prob::HOODEProblem{T}; 
nb_tau::Integer=32, 
order::Integer=4, 
order_prep::Integer=order+2, 
dense::Bool=true, 
nb_t::Integer=100, 
getprecision::Bool=dense,
verbose=100,
par_u0::Union{PrepareU0,Missing}=missing,
p_coef::Union{CoefExpAB,Missing}=missing
) where T<:AbstractFloat

specific interface solver for Highly oscillatory problems, that an ODE of this form:

\[\frac{\delta u(t)}{\delta t} = \frac{1}{\varepsilon} A + F(u(t), t)\]

where $u \in \R^n$ and $0 < \varepsilon < 1$ $A$ must be a periodic matrix i.e. $e^{t A} = e^{(t+\pi) A}$ for any $t \in \R$

Argument :

  • prob::HOODEProblem{T} : The problem to solve

Keywords :

  • nb_tau::Integer=32 : number of values of FFT transform, must be power of twoscalespureab
  • order::Integer=4 : order of Adams-Bashforth method, and also of the interpolatation
  • order_prep::Integer=order+2 : order of the preparation
  • dense::Bool=true : if true it is possible to compute solution at any time of the interval
  • nb_t::Integer=100 : number of period slices
  • getprecision::Bool=dense : compute the absolute and relative precision
  • par_u0::Union{PrepareU0,Missing}=missing : preparation data for u0
  • p_coef::Union{CoefExpAB,Missing}=missing : coefficients for Adams-Bashforth method

Examples :

source
CommonSolve.solveMethod
solve(prob::ODEProblem, alg::HOODEAB{order, ntau}; 
dt=nothing,
kwargs...
) where {order,ntau}

common interface solver for Highly oscillatory problems, that an ODE of this form

\[\frac{\delta u(t)}{\delta t} = \frac{1}{\varepsilon} A + F(u(t), t)\]

where $u \in \R^n$ and $0 < \varepsilon < 1$ $A$ must be a periodic matrix i.e. $e^{t A} = e^{(t+\pi) A}$ for any $t \in \R$

Argument :

  • prob::ODEProblem : The problem to solve
  • alg::HOODEAB{order, ntau} : the Adams-Bashforth HOODE algorithm

Keywords :

  • dt : duration of a time interval
  • kwargs... : other keywords
source
HOODESolver.twoscales_pure_abMethod
twoscales_pure_ab(par::PrepareTwoScalesPureAB; only_end::Bool=false, diff_fft::Bool=false, res_fft::Bool=false, verbose::Integer=100)

compute the data to get solution of the differential equation

Arguments :

  • par::PrepareTwoScalesPureAB : contains all the parameters and prepared data

Keywords :

  • only_end=false : if true return only the result for t_end
  • diff_fft::Bool=false : if true return data about diff
  • res_fft::Bool=false : if true return u_caret data indispensable for interpolation
  • verbose::Integer: level off traces (0 means no output)
source
Polynomials.derivativeMethod
derivative(pe::PolyExp)

Construct the derivative of the pe function.

Examples

julia> derivative(PolyExp([1, 3, -1],3,1))
PolyExp(Polynomial(6 + 7*x - 3*x^2)*exp(3*x + 1))

julia> derivative(PolyExp([1.0+im, 3im, -1, 4.0], 2.0+1.5im,1.0im))
PolyExp(Polynomial((0.5 + 6.5im) - (6.5 - 6.0im)*x + (10.0 - 1.5im)*x^2 + (8.0 + 6.0im)*x^3)*exp((2.0 + 1.5im)*x + 1.0im))
source
Polynomials.integrateMethod
integrate(pe::PolyExp)

Construct the integrate function of pe which is of PolyExp type. The algorithm used is a recursive integration by parts.

Examples

julia> integrate(PolyExp([1.0,2,3],2.0,5.0))
PolyExp(Polynomial(0.75 - 0.5*x + 1.5*x^2)*exp(2.0*x + 5.0))

julia> integrate(PolyExp([1.0+0im,2],2.0im,3.0+0im))
PolyExp(Polynomial((0.5 - 0.5im) - 1.0im*x)*exp(2.0im*x + 3.0))
source