Granular.jl

Julia package for granular dynamics simulation
git clone git://src.adamsgaard.dk/Granular.jl
Log | Files | Refs | README | LICENSE

commit e65f3fdeb04421265a6773dade8052d3c1a2a777
parent 0b36c038e19adaf7a13391c4e268f5af9059c355
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Thu, 15 Jun 2017 12:43:29 -0400

VTK source file path, test long runs in VTK test

Diffstat:
Msrc/io.jl | 5++++-
Mtest/vtk.jl | 5+++--
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/io.jl b/src/io.jl @@ -560,13 +560,16 @@ output VTK files and applies appropriate glyph filters to the data. function writeParaviewStateFile(simulation::Simulation; filename::String="", folder::String=".", - vtk_folder::String=".", # maybe expand to full path? + vtk_folder::String="", verbose::Bool=true) if filename == "" folder = folder * "/" * simulation.id mkpath(folder) filename = string(folder, "/", simulation.id, ".pvsm") end + if vtk_folder == "" + vtk_folder = pwd() * "/" * simulation.id + end open(filename, "w") do f write(f, """<ParaView> diff --git a/test/vtk.jl b/test/vtk.jl @@ -54,12 +54,13 @@ SeaIce.setTotalTime!(sim, 1.5) SeaIce.setTimeStep!(sim) sim.file_number = 0 SeaIce.run!(sim, single_step=true) +@test SeaIce.readSimulationStatus(sim.id) == 1 +SeaIce.setOutputFileInterval!(sim, 0.1) +SeaIce.run!(sim) @test readstring(`$(cmd) $(icefloepath)$(cmd_post)`) == icefloechecksum @test readstring(`$(cmd) $(icefloeinteractionpath)$(cmd_post)`) == icefloeinteractionchecksum @test readstring(`$(cmd) $(oceanpath)$(cmd_post)`) == oceanchecksum -@test SeaIce.readSimulationStatus(sim.id) == 1 - SeaIce.removeSimulationFiles(sim)