Function read_target

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

Read only the specified mesh from a meshtal file

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("path/to/meshtal.msht", 104).unwrap();

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