Function mesh_to_ww_advanced

pub fn mesh_to_ww_advanced(
    mesh: &Mesh,
    powers: &[f64],
    max_errors: &[f64],
) -> WeightWindow
Expand description

Mesh tally to global weight windows with fine de-tuning and errors

Same as mesh_to_ww but allows for individual de-tuning factors and error tolerances for each group. If powers or max_errors have a single entry this will be applied to all groups.

  • powers - Softening factor used as ww=>ww^power
  • max_errors - Errors above this are set to 0/analogue

A call to this may look like this, applying separate powers and errors to a mesh with 3 energy groups:

// Read tally 104 from a meshtal file
let mesh = read_target("./data/meshes/fmesh_104.msht", 104).unwrap();
// Convert the mesh into a set of weight windows, using different parameters per set
let ww = mesh_to_ww_advanced(&mesh,
                             &[0.7, 0.5, 0.85],
                             &[0.1, 0.1, 0.15]);

The lists should be ordered such that they match the following nested order:

for energy in energy_groups {
    for time in time_groups {
        calculate weights...
    }
}

For example, the following energy and time groups are related to the groups shown explicitly below.

Energy bin boundaries: 0.0 10.0 200.0
Time bin boundaries  : -1E+36 0.0 1E+16 1E+99
0 -> Energy(10.0)   Time(0.0)       powers[0]   max_errors[0]
1 -> Energy(10.0)   Time(1E+16)     powers[1]   max_errors[1]
2 -> Energy(10.0)   Time(1E+99)     powers[2]   max_errors[2]
3 -> Energy(200.0)  Time(0.0)       powers[3]   max_errors[3]
4 -> Energy(200.0)  Time(1E+16)     powers[4]   max_errors[4]
5 -> Energy(200.0)  Time(1E+99)     powers[5]   max_errors[5]