Function read

pub fn read<P>(path: P) -> Result<Vec<Mesh>, Error>
where P: AsRef<Path>,
Expand description

Read all meshes in a meshtal file

Returns a result containing a vector of Mesh structs extracted from the file at path by the parser.

  • path - Path to the meshtal file, can be &str, String, Path, etc…

Example

// Read every mesh contained in a legacy meshtal file
let mesh_tallies: Vec<Mesh> = read("path/to/meshtal.msht").unwrap();

// Read every mesh contained in a HDF5 runtape (mcnp >6.3)
let mesh_tallies: Vec<Mesh> = read("path/to/runtape.r.h5").unwrap();