Function read_target_pb

pub fn read_target_pb<P>(path: P, target: u32) -> Result<Mesh, Error>
where P: AsRef<Path>,
Expand description

Read only the specified mesh, with progress bar

Returns a result of the targeted Mesh if it was successfully extracted from the file at path.

  • path - Path to the meshtal file, can be &str, String, Path, etc…
  • target - Tally number of interest

Example

// Read only tally 104 (i.e. FMESH104) from a legacy meshtal file
let mesh: Mesh = read_target_pb("path/to/meshtal.msht", 104).unwrap();

// Read only tally 104 (i.e. FMESH104) from a HDF5 runtape
let mesh: Mesh = read_target_pb("path/to/meshtal.msht", 104).unwrap();