Skip to content
Snippets Groups Projects

Implement regularizations for Euler eq

Closed Florian Atteneder requested to merge fa/euler-new-regulates into main
Files
5
+ 20
4
const TO = TimerOutput()
function testparfiles()
function get_testparfiles()
path = normpath(joinpath(@__DIR__, "..", "test", "IntegrationTests", "refs", "testconfig.toml"))
if !isfile(path)
error("failed to locate testconfig $path")
end
config = TOML.parsefile(path)
list = sort(collect(keys(config)))
return list
end
function testparfiles()
list = get_testparfiles()
println("Available list of test parameter files:")
for l in list
println(" - $l")
end
pretty_table(hcat(1:length(list), list), alignment=[:r,:l], noheader=true)
println("Use with `main(\"@test/<name>\")`")
end
@@ -25,6 +28,10 @@ function parse_parfile(filename)
end
path
else
nr = tryparse(Int64, filename)
if !isnothing(nr)
return parse_parfile(nr)
end
filename
end
if !isfile(path)
@@ -32,6 +39,15 @@ function parse_parfile(filename)
end
return abspath(path)
end
function parse_parfile(nr::Integer)
testpars = get_testparfiles()
if !(1 <= nr <= length(testpars))
error("there is no test parfile with nr $nr")
end
parfile = testpars[nr]
path = normpath(joinpath(@__DIR__, "..", "test", "IntegrationTests", "refs", parfile, "$parfile.toml"))
return abspath(path)
end
"""
Loading