From 2dfb842a503d8863a0c4f00e899fffe19bfd5ede Mon Sep 17 00:00:00 2001 From: Juan Ignacio Polanco Date: Sun, 31 Oct 2021 16:44:25 +0100 Subject: [PATCH] Nested multiblock: test all possible signatures --- test/checksums.sha1 | 19 ++++++++------ test/multiblock.jl | 60 ++++++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 30 deletions(-) diff --git a/test/checksums.sha1 b/test/checksums.sha1 index e72ec1af..f7222020 100644 --- a/test/checksums.sha1 +++ b/test/checksums.sha1 @@ -1,15 +1,18 @@ da0381aac3753f794e930ac0a7ed3fa11b50ce5a polyhedron_cube.vtu -d777d8e429ffa2958bac7160608829bcbfd66f50 multiblock.vtm +62c222a3535e3022d42321ba10e322ba8f369614 multiblock.vtm 4b83d44ce2cd0ebc1816e01cd9a7445a8e80facf multiblock_1.vts 271ce2abd35ee0cfa4aff7af5e925176d32c8282 multiblock_2.vtr 343268280766774ba512a7f0acf956be02f2752c multiblock_3.vtu -b06d6f6768bcb38c1a13c488cac0186decc6e30a multiblock_4_volume.vtu -9c515ac8f64a0ba28addcf25b87ad24728d76c7e multiblock_4_imin.vtu -7a31ebb9810fa8e922eecfd593dc1d0102e50531 multiblock_4_imax.vtu -b3343f2806e43d5923f4e005b5d4d7150608a93a multiblock_4_jmin.vtu -cfaa9ad800e3c4b6441d037ee518275e0c62d25b multiblock_4_jmax.vtu -63a9caef4fbaaa3b48a7d8d2440213d7dbdb61d5 multiblock_4_kmin.vtu -cbef63eb490680238aea2f65b959cc4a64d6b4f9 multiblock_4_kmax.vtu +6f90855f9b87c9c06ba058d42fddda8ba43a496d multiblock_4_volume.vtu +fe1768ae48962747a220dcdbe4f4dbb21cbc7c28 multiblock_4_imin.vtu +c609ec3a84d9eaa6173b01b9778b1519f5593fdd multiblock_4_imax.vtu +d4c50ee9954494de8d262acddcbcfddeaee77980 multiblock_4_jmin.vtu +6139eff14d3841e7e25b639e373b06613735a5b7 multiblock_4_jmax.vtu +e7dd60382031b281df419dab28b73ca90275b114 multiblock_4_kmin.vtu +86deb2dbce8049b2d41cf6bff15dc1cdbefb5b21 multiblock_4_kmax.vtu +c86b48a7844e07a1b21b8ae9ee9b5336889375f5 multiblock_4_8.vtu +734d5cafcdafa7dacfacc19bbef806cf3ce224a7 multiblock_4_9.vtu +92c7120b4277720f43189d90bd0e67ccbdf69666 very_nested.vtu e5e396469b59d25c970ec67172f70fed82fa810d rectilinear_2D.vtr 18e7e3793ec552d60e3f689d4631d48d2f98f9c0 rectilinear_3D.vtr 9e82744afa51ece188c8819349cd206183e9216d imagedata.vti diff --git a/test/multiblock.jl b/test/multiblock.jl index 549e658e..609a1dcc 100644 --- a/test/multiblock.jl +++ b/test/multiblock.jl @@ -101,7 +101,7 @@ end function fourth_block_data() # Create unstructured example with boundaries. - imax, jmax, kmax = 40, 50, 20 + imax, jmax, kmax = 25, 30, 20 indices = LinearIndices((1:imax, 1:jmax, 1:kmax)) # Create points and point data. @@ -516,27 +516,43 @@ function main() # Fourth block is a collection of multiblock files itself. block = multiblock_add_block(vtm, "multiblock_4") - vtk = vtk_grid(block, "multiblock_4_volume", points4, cells4) - vtk["q_values"] = q4 - vtk["c_values"] = c4 - vtk = vtk_grid(block, "multiblock_4_imin", points41, cells41) - vtk["q_values"] = q41 - vtk["c_values"] = c41 - vtk = vtk_grid(block, "multiblock_4_imax", points42, cells42) - vtk["q_values"] = q42 - vtk["c_values"] = c42 - vtk = vtk_grid(block, "multiblock_4_jmin", points43, cells43) - vtk["q_values"] = q43 - vtk["c_values"] = c43 - vtk = vtk_grid(block, "multiblock_4_jmax", points44, cells44) - vtk["q_values"] = q44 - vtk["c_values"] = c44 - vtk = vtk_grid(block, "multiblock_4_kmin", points45, cells45) - vtk["q_values"] = q45 - vtk["c_values"] = c45 - vtk = vtk_grid(block, "multiblock_4_kmax", points46, cells46) - vtk["q_values"] = q46 - vtk["c_values"] = c46 + vtk_grid(block, "multiblock_4_volume", points4, cells4) do vtk + vtk["q_values"] = q4 + vtk["c_values"] = c4 + end + vtk_grid(block, "multiblock_4_imin", points41, cells41) do vtk + vtk["q_values"] = q41 + vtk["c_values"] = c41 + end + vtk_grid(block, "multiblock_4_imax", points42, cells42) do vtk + vtk["q_values"] = q42 + vtk["c_values"] = c42 + end + vtk_grid(block, "multiblock_4_jmin", points43, cells43) do vtk + vtk["q_values"] = q43 + vtk["c_values"] = c43 + end + vtk_grid(block, "multiblock_4_jmax", points44, cells44) do vtk + vtk["q_values"] = q44 + vtk["c_values"] = c44 + end + vtk_grid(block, "multiblock_4_kmin", points45, cells45) do vtk + vtk["q_values"] = q45 + vtk["c_values"] = c45 + end + vtk_grid(block, "multiblock_4_kmax", points46, cells46) do vtk + vtk["q_values"] = q46 + vtk["c_values"] = c46 + end + + points = copy(points4) + points[3, :, :, :] .+= 1 + vtk_grid(identity, block, points, cells4) # unnamed VTK file + subblock = multiblock_add_block(vtm) # unnamed nested block + points[1, :, :, :] .+= 1.2 + vtk_grid(identity, block, points, cells4) # unnamed nested block + unnamed VTK file + points[2, :, :, :] .+= 2.1 + vtk_grid(identity, block, "very_nested", points, cells4) # unnamed nested block + named VTK file end println("Saved: ", join(outfiles, " "))