This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! 0 bytes Base.#! | |
!= 0 bytes Base.#!= | |
!== 0 bytes Base.#!== | |
$ 0 bytes Base.#$ | |
% 0 bytes Base.#rem | |
& 0 bytes Base.#& | |
* 0 bytes Base.#* | |
+ 0 bytes Base.#+ | |
- 0 bytes Base.#- | |
.!= 0 bytes Base.#.!= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importall Base | |
import RecursiveArrayTools.recursivecopy! | |
using DifferentialEquations | |
type SimType{T} <: AbstractArray{T,1} | |
x::Array{T,1} | |
f1::T | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importall Base | |
import RecursiveArrayTools.recursivecopy! | |
using DifferentialEquations | |
type SimType{T} <: AbstractArray{T,1} | |
x::Array{T,1} | |
f1::T | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DifferentialEquations, BenchmarkTools | |
import ODE | |
function vop_prop( x, dt::Float64 ) | |
reltol = 1e-5 | |
abstol = 1e-13 | |
maxstep = 300.0 #sec | |
p = ODEProblem( vopeom, | |
x, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importall Base | |
import RecursiveArrayTools.recursivecopy! | |
using DiffEqBase | |
using OrdinaryDiffEq | |
type SimType{T} <: AbstractArray{T,1} | |
x::Array{T,1} | |
f1::T | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = 10 | |
λ=-0.1; tEnd=1000. | |
tThreshold = 0.1 | |
u0 = zeros(4 * N) | |
for i in 1 : N | |
u0[2*i - 1] = -5. + 10.*rand() | |
u0[2*i] = -5. + 10.*rand() | |
u0[2*N + 2*i - 1] = 0. | |
u0[2*N + 2*i] = 1. | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 required packages: | |
- AlgebraicDiffEq 0.1.0+ master | |
- ApproxFun 0.4.1+ development | |
- ArbFloats 0.1.15+ master | |
- BandedMatrices 0.2.0 | |
- BenchmarkTools 0.0.6 | |
- ComposeDiff 0.0.2 | |
- DecFP 0.1.5 | |
- Decimals 0.1.0 | |
- DiffEqDevTools 0.6.0+ master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
len = 10000 | |
function nosimd1(x,y,z,w) | |
@inbounds for i in eachindex(x) | |
x[i] += z[i] | |
y[i] += w[i] | |
end | |
end | |
function nosimd2(x,y,z,w) | |
@inbounds for i in eachindex(x) | |
x[i] += z[i] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DiffEqBase | |
using OrdinaryDiffEq | |
using ParameterizedFunctions | |
params = [0.0] | |
function dyn_eq(t,u,params,du) | |
du .= [0 1; | |
0 0]*u + [0;1]*params[1] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract DEDataArray{T} <: AbstractArray{T,1} | |
similar(A::DEDataArray) = deepcopy(A) | |
done(A::DEDataArray, i::Int64) = done(A.x,i) | |
eachindex(A::DEDataArray) = eachindex(A.x) | |
next(A::DEDataArray, i::Int64) = next(A.x,i) | |
start(A::DEDataArray) = start(A.x) | |
length(A::DEDataArray) = length(A.x) |