Granular.jl

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

commit 7e1e33401f9beb4636262d2e51e56b70dbf406fb
parent 68d3496d377eb59d1dc339564c1f82c0ed35d7b7
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Wed, 17 May 2017 10:03:23 -0400

add more fields to ocean VTK file

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

diff --git a/src/io.jl b/src/io.jl @@ -151,7 +151,12 @@ function writeOceanVTK(ocean::Ocean, end end - WriteVTK.vtk_point_data(vtkfile, vel, "Velocity [m/s]") + WriteVTK.vtk_point_data(vtkfile, vel, "Velocity vector [m/s]") + + WriteVTK.vtk_point_data(vtkfile, ocean.h[:, :, :, 1], + "h: Layer thickness [m]") + WriteVTK.vtk_point_data(vtkfile, ocean.e[:, :, :, 1], + "e: Relative interface height [m]") outfiles = WriteVTK.vtk_save(vtkfile) if verbose diff --git a/test/vtk.jl b/test/vtk.jl @@ -29,10 +29,11 @@ end "88daceb1b99c519154b1acdcf8f340967794c552c74ea70c4af8954d8af5296a " * "test.icefloes.1.vtu\n" -@test readstring(`$(cmd) test.ocean.1.vts$(cmd_post)`) == -"f0117e414c4e71a0c55980f63865eb03b6c597fa2546983258b8a57eb4ff2a25 " * +oceanchecksum = "d56ffb109841a803f2b2b94c74c87f7a497237204841d557d2b1043694d51f0d " * "test.ocean.1.vts\n" +@test readstring(`$(cmd) test.ocean.1.vts$(cmd_post)`) == oceanchecksum + SeaIce.removeSimulationFiles(sim) info("Testing VTK write during run!()") @@ -47,8 +48,6 @@ SeaIce.run!(sim, single_step=true) "203030169e90d9ab9538074d2c196ae61dbd8dc3522fcc18e294d4ee70fe4504 " * "test.icefloes.1.vtu\n" -@test readstring(`$(cmd) test.ocean.1.vts$(cmd_post)`) == -"f0117e414c4e71a0c55980f63865eb03b6c597fa2546983258b8a57eb4ff2a25 " * -"test.ocean.1.vts\n" +@test readstring(`$(cmd) test.ocean.1.vts$(cmd_post)`) == oceanchecksum SeaIce.removeSimulationFiles(sim)