Skip to content

Commit

Permalink
Update also other metadata in Grid::set_convolution
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Aug 27, 2024
1 parent 091b000 commit 741dcb9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pineappl/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,19 @@ impl Grid {

self.set_key_value(&format!("convolution_type_{}", index + 1), &type_);
self.set_key_value(&format!("convolution_particle_{}", index + 1), &particle);

// update the remaining metadata
for (index, convolution) in self.convolutions().into_iter().enumerate() {
if self
.key_values()
// UNWRAP: we set some key-values before so there must be a storage
.unwrap_or_else(|| unreachable!())
.get(&format!("initial_state_{}", index + 1))
.is_some()
{
self.set_convolution(index, convolution);
}
}
}

fn increase_shape(&mut self, new_dim: &(usize, usize, usize)) {
Expand Down

0 comments on commit 741dcb9

Please sign in to comment.