The clarity of this could be improved by making use of the standard algorithms library for std::exclusive_scan
|
EntOffsetsArray offsets{}; |
|
size_t offset = 0; |
|
for (size_t i = 0; i < offsets.size(); ++i) { |
|
offsets[i] = offset; |
|
if (i <= static_cast<size_t>(mesh_.dim()) && nodes_per_dim_[i]) |
|
offset += mesh_.nents(i); |
|
} |
|
offsets[offsets.size() - 1] = offset; |
|
return offsets; |
The clarity of this could be improved by making use of the standard algorithms library for
std::exclusive_scanpcms/src/pcms/adapter/omega_h/omega_h_field_layout.cpp
Lines 290 to 298 in d50b976