Types
HOODESolver.HOODEAB — TypeHOODEAB( order=4, ntau=32)Algorithm for High-Oscillatory equation
HOODESolver.HOODEProblem — TypeHOODEProblem(f, u0, tspan, p, A, epsilon, B)The HOODE problem is :
\[\frac{du}{dt} = ( \frac{1}{\epsilon} A + B) u + f(u,p,t)\]
- The initial condition is $u(tspan[1]) = u0$.
- The solution $u(t)$ will be computed for $tspan[1] ≤ t ≤ tspan[2]$
- Constant parameters to be supplied as the second argument of $f$.
- Periodic Matrix of the problem.
- epsilon of the problem.
- Matrix of linear problem to get the exact solution
HOODESolver.PolyExp — TypePolyExp(p::Vector{T}, a::T, b::T)
PolyExp(pol::Polynomial{T},a::T,b::T)On the model of Polynomial from package Polynomials, construct a function that is a polynome multiply by an exponential function. The exponential is an exponential of an affine function $a x + b$. The polynome is construct from its coefficients p, lowest order first.
If $f = (p_n x^n + \ldots + p_2 x^2 + p_1 x + p_0)e^{a x + b}$, we construct this through PolyExp([p_0, p_1, ..., p_n], a, b). It is also possible to construct it directly from the polynome.
In the sequels some methods with the same name than for Polynomial are implemented (derivative, integrate, strings, ...) but not all, only the methods needed are developped.
Arguments :
p::Vector{T}or pol::Polynomial{T} : vector of coefficients of the polynome, or directly the polynome.a::T,b::T: coefficients of affine exponentiated function.
Examples
julia> pe=PolyExp([1,2,3],2,1)
PolyExp(Polynomial(1 + 2*x + 3*x^2)*exp(2*x + 1))
julia> pe(0)
2.718281828459045
julia> pe(1)
120.51322153912601HOODESolver.PrepareFftBig — TypePrepareFftBig( size_fft::Unsigned, [T=BigFloat])Immutable structure to operate fft transform, x is the type of non transformed data also called signal.
Arguments :
size_fft::Integer: Number of values, must be a power of two[T=BigFloat | x::T ]: type of the values
Implementation
- size_fft : size of the signal
- tab_permut : permutation
- root_one : size order roots of one
- rootoneconj : conjugate of root_one
HOODESolver.PreparePhi — TypePreparePhi(n_tau::Integer, epsilon::AbstractFloat, matrix_A::Matrix{Number},
fct::Function, [matrix_B::Matrix])Immutable structure, to share calculations, needed for the phi function. These data can be used elsewhere for example in twoscale function.
Arguments :
n_tau::Integer: number of value around the unit disk, it must be a power of two.epsilon::AbstractFloat: epsilon of the system, the type of this value will be the typeof the result.matrix_A::Matrix{Number}: Matrix of twoscale systemfct::Function: function of the system[matrix_B::Matrix]: matrix representing the linear function for debug
Keywords
mode=1: possibility of addionnal modes for optional behaviorparamfct=missing: middle parameter of function fctt_0=zero(epsilon): beginning of the time
Fields :
epsilon: epsilon of the system.n_tau: number of values for ffttau_list: list of values around the unit disk (0 ... ntau/2 -ntau/2-1 ... -1 )tau_int: list of values to integrate FFTmatrix_Ap: sparse matrix with time dimensiontau_Ap: for each angular $\tau$ around the unit disk the matrix $e^{(\tau \time Ap)}$tau_Ap_inv: inverse of tau_Appar_fft: fft parametersfct: function of differential equationparamfct: middle parameter of function fctsize_vect: size of vector that is the size of the matrixmatrix_B: B matrix for the linear casemode: for optional behaviort_0: beginning of the time
HOODESolver.PrepareTwoScalesPureAB — TypePrepareTwoScalesPureAB(nb_t, t_max, order, par_u0::PrepareU0)Immutable structure, to share calculations, needed for the twoscale function
Arguments :
nb_t::Int: number of time slicest_max: end of the timeorder: order for compute the coefficientspar_u0::PrepareU0: prepared initial data
Keywords :
p_coef::Union{CoefExpAB,Missing}=missing: precomputed coefficients of AB methodverbose=100: trace level
Fields :
- nb_t : number of time slices
- t_max : end of the time
- order : order for compute the coefficients
- parphi : prepared parameters for phi (from par_u0)
- par_u0 : prepared initial data
- p_coef : computed coefficients
- exptau : exp( -imdt' au'/epsilon) for all ' au' values
- exptau_inv : inverse of exptau
- verbose : trace level
HOODESolver.PrepareU0 — TypePrepareU0(parphi::PreparePhi, order, u0, newprec)Preparation of the original data
Arguments
parphi::PreparePhi: phi prepared parametersorder: order of the preparationu0: initial data[newprec]: precision for the compute, if no given a default value is computed as a function of epsilon
Fields
parphi: phi prepared parametersorder: order of the preparationut0: formated initial datau0:initial data