Skip to content

Commit

Permalink
remove the update according to old field
Browse files Browse the repository at this point in the history
  • Loading branch information
gouarin committed Oct 6, 2023
1 parent ca00bb3 commit e815818
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/samurai/algorithm/update.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,15 +744,15 @@ namespace samurai
set_refine.apply_op(prediction<pred_order, true>(new_field, field));
}

for (std::size_t level = 1; level <= max_level; ++level)
{
auto subset = intersection(intersection(old_mesh[mesh_id_t::cells][level],
difference(new_mesh[mesh_id_t::cells][level], mesh[mesh_id_t::cells][level])),
mesh[mesh_id_t::cells][level - 1])
.on(level);

subset.apply_op(copy(new_field, old_field));
}
// for (std::size_t level = 1; level <= max_level; ++level)
// {
// auto subset = intersection(intersection(old_mesh[mesh_id_t::cells][level],
// difference(new_mesh[mesh_id_t::cells][level], mesh[mesh_id_t::cells][level])),
// mesh[mesh_id_t::cells][level - 1])
// .on(level);

// subset.apply_op(copy(new_field, old_field));
// }

std::swap(field.array(), new_field.array());
std::swap(old_field.array(), new_field.array());
Expand Down

0 comments on commit e815818

Please sign in to comment.