tcheck VTK files after contact search, fix small error in bond VTK write - Granular.jl - Julia package for granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/Granular.jl
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6bfb5be2a000d91f0be15231f24b8036306b03b2
 (DIR) parent 970f3916021a2c94f12552c1dd8775a17f6d4224
 (HTM) Author: Anders Damsgaard <andersd@riseup.net>
       Date:   Fri,  2 Jun 2017 11:02:58 -0400
       
       check VTK files after contact search, fix small error in bond VTK write
       
       Diffstat:
         M src/io.jl                           |       3 ++-
         M test/vtk.jl                         |       6 +++---
       
       2 files changed, 5 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/src/io.jl b/src/io.jl
       t@@ -247,11 +247,12 @@ function writeIceFloeBondVTK(simulation::Simulation,
                
                # Write 0-indexed offset for the connectivity array for the end of each 
                # cell
       -        write(f, "        <DataArray name=\"connectivity\" type=\"Int64\" " *
       +        write(f, "        <DataArray name=\"offsets\" type=\"Int64\" " *
                      "format=\"ascii\">\n")
                for i=1:length(i1)
                    write(f, "$((i - 1)*2 + 2) ")
                end
       +        write(f, "\n")
                write(f, "        </DataArray>\n")
        
                write(f, "      </Lines>\n")
 (DIR) diff --git a/test/vtk.jl b/test/vtk.jl
       t@@ -9,6 +9,7 @@ sim = SeaIce.createSimulation(id="test")
        SeaIce.addIceFloeCylindrical(sim, [ 0., 0.], 10., 1., verbose=false)
        SeaIce.addIceFloeCylindrical(sim, [18., 0.], 10., 1., verbose=false)
        sim.ocean = SeaIce.createRegularOceanGrid([10, 20, 5], [10., 25., 2.])  
       +SeaIce.findContacts!(sim, method="all to all")
        SeaIce.writeVTK(sim, verbose=false)
        
        cmd_post = ""
       t@@ -26,7 +27,7 @@ else
        end
        
        icefloechecksum = 
       -"b34352d9fc151411d7cd60fcdfdfc29c5f6876928248b5e6916e8668d58b0887  " *
       +"cbce00877a96d6ec778ae6a9eabce8c18344e0b57f846c34a2777d0882376aeb  " *
        "test.icefloes.1.vtu\n"
        
        oceanchecksum =
       t@@ -44,9 +45,8 @@ SeaIce.setTotalTime!(sim, 1.5)
        SeaIce.setTimeStep!(sim)
        sim.file_number = 0
        SeaIce.run!(sim, single_step=true)
       -SeaIce.run!(sim, single_step=true)
        
        @test readstring(`$(cmd) test.icefloes.1.vtu$(cmd_post)`) == icefloechecksum
        @test readstring(`$(cmd) test.ocean.1.vts$(cmd_post)`) == oceanchecksum
        
       -SeaIce.removeSimulationFiles(sim)
       +#SeaIce.removeSimulationFiles(sim)