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
module Functionals | |
abstract type Abstract end | |
type Functional <: Abstract | |
lower::Float64 | |
upper::Float64 | |
end | |
Functional(t::Float64) = Functional(0.0, 12.0 * t) |
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 Base.Threads, Random | |
function run(;waittime=1.0e-3) | |
function calcsubset(N) | |
Random.seed!(0) | |
return sort(shuffle(collect(1:N))[1:Int(ceil(round(N / 3)))]) | |
end | |
# we know that only a sorted subset of rows need be iterated over for the first loop |
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
# Based on https://gist.github.com/mbauman/d0c27f40e25393ef050b87b4bb6a69dc | |
using Cassette, ReplMaker | |
Cassette.@context RandAlwaysHalf | |
randreturnshalf(s, x) = x | |
function randreturnshalf(s, f, fx) | |
if f == rand | |
return randreturnshalf(s, one(typeof(fx)) / 2) |
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
""" | |
A macro `@replacerand` that replaces the value returned by a call to `rand` with something else. | |
""" | |
using Cassette | |
Cassette.@context ReplaceRand | |
Cassette.overdub(ctx::ReplaceRand, fn::typeof(rand), args...) = ctx.metadata(args...) |
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
module Cuckoo | |
export @cuckoo | |
using Cassette | |
Cassette.@context Ctx | |
function _cuckoo(chicks::Dict, nest) | |
for (oldchicks, newchicks) ∈ chicks | |
@eval function Cassette.overdub(ctx::Ctx, |
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 Random | |
const seed = hash(time()) | |
Random.seed!(seed) | |
searchstring = "const seed = " | |
open("$(@__FILE__)" * ".reproducible", "w") do io | |
for line in readlines(open(@__FILE__)) | |
if length(line) > length(searchstring) && line[1:length(searchstring)] == searchstring |
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
module BiComplexes | |
using AutoHashEquals | |
export BiComplex, derivative | |
@auto_hash_equals struct BiComplex{T} <: Number | |
re::Complex{T} | |
im::Complex{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 ForwardDiff: Dual, Tag, jacobian, value, tagtype, partials, gradient | |
using LinearAlgebra | |
using NLsolve | |
using Random | |
using Test | |
Random.seed!(0) | |
const jac = jacobian |
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 OrdinaryDiffEq | |
using LinearAlgebra | |
using StaticArrays | |
using Trixi | |
import Trixi: AbstractEquations, varnames, flux | |
abstract type AbstractMaxwellEquations{NDIMS, NVARS} <: AbstractEquations{NDIMS, NVARS} end | |
struct MaxwellEquations2D{RealT<:Real} <: AbstractMaxwellEquations{2, 6} | |
μ₀::Float64 | |
ϵ₀::Float64 |
This file has been truncated, but you can view the full file.
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by GNU Octave configure 6.4.0, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure CFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-data=cacheline -ftree-vectorize -fno-semantic-interposition -fomit-frame-pointer -I/home/cookj/BUILT/include -L/home/cookj/BUILT/lib -Wl,-rpath=/home/cookj/BUILT/lib -pipe -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -lmimalloc CXXFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-data=cacheline -ftree-vectorize -fno-semantic-interposition -fomit-frame-pointer -I/home/cookj/BUILT/include -L/home/cookj/BUILT/lib -Wl,-rpath=/home/cookj/BUILT/lib -pipe -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -lmimalloc FFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-dat |
OlderNewer