Skip to content

Commit 2f7b68a

Browse files
committed
Use updated vtkio version
1 parent cc48ada commit 2f7b68a

File tree

3 files changed

+81
-45
lines changed

3 files changed

+81
-45
lines changed

Cargo.lock

Lines changed: 68 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

splashsurf_lib/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ numeric_literals = "0.2"
5151
rstar = "0.12"
5252

5353
# IO
54-
vtkio = { version = "0.6", optional = true }
54+
#vtkio = { version = "0.6", optional = true }
55+
vtkio = { git = "https://github.com/w1th0utnam3/vtkio", optional = true , rev = "6e76b123b2fbd619e50317a0ffd5d6a99c80b9de" }
5556
ply-rs = { version = "0.1.3", optional = true }
5657
flate2 = { version = "1.0", optional = true }
5758
nom = { version = "8.0", optional = true }

splashsurf_lib/src/io/vtk_format.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ pub fn write_vtk<P: AsRef<Path>>(
189189
) -> Result<(), anyhow::Error> {
190190
profile!("write_vtk");
191191
let vtk_file = Vtk {
192-
version: Version::new((4, 2)),
192+
//version: Version::new((4, 2)),
193+
version: Version::new_legacy(4, 2),
193194
title: title.to_string(),
194195
file_path: None,
195196
byte_order: ByteOrder::BigEndian,
@@ -413,14 +414,20 @@ pub mod test {
413414
}
414415

415416
#[test]
417+
#[ignore = "Disabled due to vtkio/XML parser not supporting raw embedded binary data (https://github.com/elrnv/vtkio/issues/27)"]
416418
fn test_cube_8_particles_from_vtu() -> Result<(), anyhow::Error> {
417419
test_load_num_particles("../data/cube_8_particles.vtu", 8)
418420
}
419421

420422
#[test]
421-
#[ignore = "Disabled due to bug in vtkio (https://github.com/elrnv/vtkio/issues/21#issuecomment-1513195315)"]
423+
//#[ignore = "Disabled due to bug in vtkio (https://github.com/elrnv/vtkio/issues/21#issuecomment-1513195315)"]
422424
fn test_cube_8_particles_from_vtk() -> Result<(), anyhow::Error> {
423-
test_load_num_particles("../data/cube_8_particles.vtk", 250)
425+
test_load_num_particles("../data/cube_8_particles.vtk", 8)
426+
}
427+
428+
#[test]
429+
fn test_double_dam_break_4732_particles_from_vtk() -> Result<(), anyhow::Error> {
430+
test_load_num_particles("../data/double_dam_break_frame_01_4732_particles.vtk", 4732)
424431
}
425432

426433
#[test]
@@ -429,7 +436,7 @@ pub mod test {
429436
}
430437

431438
#[test]
432-
#[ignore = "Disabled due to bug in vtkio/XML parser (https://github.com/elrnv/vtkio/issues/27)"]
439+
#[ignore = "Disabled due to vtkio/XML parser not supporting raw embedded binary data (https://github.com/elrnv/vtkio/issues/27)"]
433440
fn test_fluid_250_particles_from_vtu() -> Result<(), anyhow::Error> {
434441
test_load_num_particles("../data/fluid_250_particles.vtu", 250)
435442
}

0 commit comments

Comments
 (0)