repositony / splitmesh

Command line tool to split meshtal results into individual files. This is extremely simple but nice to have when needed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

splitmesh

Command line tool to separate tallies into individual files for large MCNP meshtal outputs that contain multiple tallies.

Split the tallies of a meshtal into individual files

Usage: splitmesh <path> [options]

Arguments:
  <path>  Path to input meshtal file

Options:
  -v, --verbose...  Verbose logging (-v, -vv)
  -q, --quiet       Supress all log output (overrules --verbose)
  -h, --help        Print help (see more with '--help')

Split options:
  -t, --tallies <id>...  List of tallies to extract
  -o, --output <name>    Prefix for output files [default: fmesh]

Note: --help shows more information and examples

Description

Splits up all meshes found in a meshtal file into their individual files.

This is very useful for processing large meshtal files with multiple tallies, or for just reducing file sizes to a minimum for post-processing.

Help is printed with the -h flag, and --help will show examples, default values, examples, and any important behaviour.

By default, every tally found in the file is splt into individual files.

How to choose specific tallies

Use the --tallies option to specify one or more tallies to be separated out. Invalid entries are simply ignored.

# Extract only tallies with ID 104, 204, and 504 from the primary file
splitmesh /path/to/file.msht --tallies 104 204 504

How to change the file names

The name of the output files is appended with the tally number as <output>_<id>.msht. Output defaults to fmesh, but this may be changed.

# Change output file names to "mymesh_<id>.msht"
splitmesh /path/to/file.msht --output mymesh

Install

Direct from github:

cargo install --git https://github.com/repositony/splitmesh.git

All executables are under ~/.cargo/bin/, which should already be in your path after installing Rust.

Click here if you have never used Rust

If you have never used the Rust programming language, the toolchain is easily installed from the official website

curl https://sh.rustup.rs -sSf | sh

This should have added source $HOME/.cargo/env to the bash profile, so update your environment with source ~/.bashrc.

About

Command line tool to split meshtal results into individual files. This is extremely simple but nice to have when needed.

License:GNU General Public License v3.0


Languages

Language:Rust 100.0%