Skip to content

Instantly share code, notes, and snippets.

View helgee's full-sized avatar

Helge Eichhorn helgee

View GitHub Profile
julia> DocMeta.setdocmeta!(AstroTime, :DocTestSetup, setup; recursive = true)
julia> doctest(AstroTime)
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
┌ Error: doctest failure in ~/projects/julia/AstroTime/src/AstroTime.jl:134-142
│ ```jldoctest
│ julia> @timescale GMT ep tai_offset(UTC, ep)
@helgee
helgee / OrbitingEarth.elm
Created February 5, 2020 13:12
elm-3d-scene Earth Test
module OrbitingEarth exposing (main)
import Angle exposing (Angle)
import Axis3d exposing (Axis3d)
import Browser
import Browser.Events
import Camera3d exposing (Camera3d)
import Color exposing (Color)
import Direction3d
import Frame3d exposing (Frame3d)
@helgee
helgee / backtrace.log
Created February 24, 2019 08:55
SPICE.jl: Test suite GC error
#0 0x00007ffff6ae1feb in raise () from /lib64/libc.so.6
#1 0x00007ffff6acc5c1 in abort () from /lib64/libc.so.6
#2 0x00007ffff7543275 in gc_assert_datatype_fail (ptls=0x7ffff7fcd400, vt=0x7fffda276000, sp=...) at /home/helge/projects/julia/dev/src/gc.c:1522
#3 0x00007ffff7545eea in gc_mark_loop (ptls=0x7ffff7fcd400, sp=...) at /home/helge/projects/julia/dev/src/gc.c:2402
#4 0x00007ffff7547113 in _jl_gc_collect (ptls=0x7ffff7fcd400, full=0) at /home/helge/projects/julia/dev/src/gc.c:2703
#5 0x00007ffff7547918 in jl_gc_collect (full=0) at /home/helge/projects/julia/dev/src/gc.c:2874
#6 0x00007ffff7541f30 in jl_gc_pool_alloc (ptls=0x7ffff7fcd400, pool_offset=1784, osize=96) at /home/helge/projects/julia/dev/src/gc.c:1102
#7 0x00007fffded77a7c in Type () at compiler/ssair/ir.jl:229
#8 japi1_domsort_ssa!_1508 (ir=..., domtree=...) at compiler/ssair/slot2ssa.jl:506
#9 0x00007fffded87347 in julia_construct_ssa!_1417 (ci=..., code=<optimized out>, ir=..., domtree=..., defuse=<optimized out>, nargs=<optimize
@helgee
helgee / callbacks.jl
Created February 27, 2018 16:17
Multiple ContinuousCallbacks
using OrdinaryDiffEq
using PyPlot
mu = 398600.4418
function affect!(integrator)
println("I am affecting at t=$(integrator.t)")
end
function apocenter_condition(u, t, integrator)
@helgee
helgee / test.c
Created July 1, 2014 15:04
Floating Point Error
#include <stdio.h>
#include <math.h>
double f(double t, double y) {
return y*cos(t);
}
int main() {
double yjulia = 2.31111366572489;
double yfortr = 2.3111136657248901;
1
-1814.0
-3708.0
5153.0
6.512
-4.229
-0.744
-1814.0
@helgee
helgee / perf_results.txt
Last active August 29, 2015 14:03
DOP853 & DOPRI5 Julia Performance
== problem A3 in DETEST ==
testing method ode23
elapsed time: 0.078190123 seconds (12007840 bytes allocated)
* number of steps: 307
* minimal step: 0.017235477520255074
* maximal step: 0.13251841619057103
* maximal deviation from known solution: 0.00024150339666606513
testing method ode23_bs
@helgee
helgee / doptest.f90
Last active December 31, 2015 17:19
program doptest
implicit none
double precision :: x
double precision :: xend
double precision, dimension(1) :: rtol
double precision, dimension(1) :: atol
double precision, dimension(6) :: y
double precision, dimension(6) :: y1