We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34e184d commit b7951aaCopy full SHA for b7951aa
include/samurai/mesh.hpp
@@ -919,7 +919,7 @@ namespace samurai
919
std::size_t subdomain_end = 0;
920
lcl_type subdomain_cells(start_level, m_domain.origin_point(), m_domain.scaling_factor());
921
// in 1D MPI, we need a specific partitioning
922
- if (dim == 1)
+ if constexpr (dim == 1)
923
{
924
std::size_t n_cells = m_domain.nb_cells();
925
std::size_t n_cells_per_subdomain = n_cells / static_cast<std::size_t>(size);
@@ -942,7 +942,7 @@ namespace samurai
942
}
943
});
944
945
- else if (dim >= 2)
+ else if constexpr (dim >= 2)
946
947
auto subdomain_nb_intervals = m_domain.nb_intervals() / static_cast<std::size_t>(size);
948
subdomain_start = static_cast<std::size_t>(rank) * subdomain_nb_intervals;
0 commit comments