downstream#
Signature#
- downstream(flow_direction, material) Field#
Assign the value from each cell’s downstream neighbour to the cell itself
- Parameters:
flow_direction (Field) – Integral array
material (Field) – Arithmetic array
- Returns:
New arithmetic array
Description#
All material is transported upstream by one cell, according to the flow direction field.
No-data handling#
A no-data value in the material array is transported upstream. Also, a no-data value in the material array results in a no-data value in the output material array. The output array may contain more no-data values than the input arrays.
Example#
/* TODO */
auto const output_material = lue::value_policies::downstream(flow_direction, input_material);
// TODO
output_material = lfr.downstream(flow_direction, input_material)