#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
-// The last two boost header files are for creating custom iterator ranges
+// The last two header files are for creating custom iterator ranges
// over integer intervals.
-#include <boost/range/irange.hpp>
+#include <deal.II/base/std_cxx20/iota_view.h>
#include <boost/range/iterator_range.hpp>
// For std::isnan, std::isinf, std::ifstream, std::async, and std::future
// defined by the <code>indices.begin()</code> and
// <code>indices.end()</code> iterators into subranges (we want to be
// able to read any entry in those subranges with constant complexity).
- // In order to provide such iterators we resort to boost::irange.
+ // In order to provide such iterators we resort to
+ // std_cxx20::ranges::iota_view.
//
// The bulk of the following piece of code is spent defining
// the "worker" <code>on_subranges</code>: i.e. the operation applied at
//
// We have one more difficulty to overcome: In order to implement the
// <code>on_subranges</code> lambda we need to name the iterator type
- // of the object returned by <code>boost::irange%<unsigned
+ // of the object returned by <code>std_cxx20::ranges::iota_view%<unsigned
// int%>()</code>. This is unfortunately a very convoluted name exposing
- // implementation details about <code>boost::irange</code>. For this
- // reason we resort to the <a
+ // implementation details about <code>std_cxx20::ranges::iota_view</code>.
+ // For this reason we resort to the <a
// href="https://en.cppreference.com/w/cpp/language/decltype"><code>decltype</code></a>
// specifier, a C++11 feature that returns the type of an entity, or
// expression.
TimerOutput::Scope scope(computing_timer,
"offline_data - compute |c_ij|, and n_ij");
- const auto indices = boost::irange<unsigned int>(0, n_locally_relevant);
+ const std_cxx20::ranges::iota_view<unsigned int> indices(
+ 0, n_locally_relevant);
const auto on_subranges = //
- [&](typename decltype(indices)::iterator i1,
- const typename decltype(indices)::iterator i2) {
- for (const auto row_index : boost::make_iterator_range(i1, i2))
+ [&](std_cxx20::ranges::iota_view<unsigned int>::iterator i1,
+ const std_cxx20::ranges::iota_view<unsigned int>::iterator i2) {
+ for (const auto row_index :
+ std_cxx20::ranges::iota_view<unsigned int>(*i1, *i2))
{
// First column-loop: we compute and store the entries of the
// matrix norm_matrix and write normalized entries into the
const auto &n_locally_owned = offline_data->n_locally_owned;
const auto &n_locally_relevant = offline_data->n_locally_relevant;
- const auto indices_owned = boost::irange<unsigned int>(0, n_locally_owned);
- const auto indices_relevant =
- boost::irange<unsigned int>(0, n_locally_relevant);
+ const std_cxx20::ranges::iota_view<unsigned int> indices_owned(
+ 0, n_locally_owned);
+ const std_cxx20::ranges::iota_view<unsigned int> indices_relevant(
+ 0, n_locally_relevant);
const auto &sparsity = offline_data->sparsity_pattern;
"time_stepping - 1 compute d_ij");
const auto on_subranges = //
- [&](typename decltype(indices_relevant)::iterator i1,
- const typename decltype(indices_relevant)::iterator i2) {
- for (const auto i : boost::make_iterator_range(i1, i2))
+ [&](std_cxx20::ranges::iota_view<unsigned int>::iterator i1,
+ const std_cxx20::ranges::iota_view<unsigned int>::iterator i2) {
+ for (const auto i :
+ std_cxx20::ranges::iota_view<unsigned int>(*i1, *i2))
{
const auto U_i = gather(U, i);
// locally.
const auto on_subranges = //
- [&](typename decltype(indices_relevant)::iterator i1,
- const typename decltype(indices_relevant)::iterator i2) {
+ [&](std_cxx20::ranges::iota_view<unsigned int>::iterator i1,
+ const std_cxx20::ranges::iota_view<unsigned int>::iterator i2) {
double tau_max_on_subrange = std::numeric_limits<double>::infinity();
- for (const auto i : boost::make_iterator_range(i1, i2))
+ for (const auto i :
+ std_cxx20::ranges::iota_view<unsigned int>(*i1, *i2))
{
double d_sum = 0.;
const auto &boundary_normal_map = offline_data->boundary_normal_map;
const auto &n_locally_owned = offline_data->n_locally_owned;
- const auto indices = boost::irange<unsigned int>(0, n_locally_owned);
+ const auto indices =
+ std_cxx20::ranges::iota_view<unsigned int>(0, n_locally_owned);
// We define the r_i_max and r_i_min in the current MPI process as
// atomic doubles in order to avoid race conditions between threads:
#include <deal.II/base/exceptions.h>
#include <deal.II/base/point.h>
-
-#include <boost/range/irange.hpp>
+#include <deal.II/base/std_cxx20/iota_view.h>
#include <array>
#include <cstdint>
* taking on all valid indices for faces (zero and one in 1d, zero
* through three in 2d, and zero through 5 in 3d).
*/
- static boost::integer_range<unsigned int>
+ static std_cxx20::ranges::iota_view<unsigned int>
face_indices();
/**
* Here, we are looping over all vertices of all cells, with `vertex_index`
* taking on all valid indices.
*/
- static boost::integer_range<unsigned int>
+ static std_cxx20::ranges::iota_view<unsigned int>
vertex_indices();
/**
template <int dim>
-inline boost::integer_range<unsigned int>
+inline std_cxx20::ranges::iota_view<unsigned int>
GeometryInfo<dim>::face_indices()
{
- return boost::irange(0U, faces_per_cell);
+ return std_cxx20::ranges::iota_view<unsigned int>(0U, faces_per_cell);
}
template <int dim>
-inline boost::integer_range<unsigned int>
+inline std_cxx20::ranges::iota_view<unsigned int>
GeometryInfo<dim>::vertex_indices()
{
- return boost::irange(0U, vertices_per_cell);
+ return std_cxx20::ranges::iota_view<unsigned int>(0U, vertices_per_cell);
}
#include <deal.II/base/exceptions.h>
#include <deal.II/base/point.h>
#include <deal.II/base/quadrature.h>
+#include <deal.II/base/std_cxx20/iota_view.h>
#include <deal.II/base/subscriptor.h>
#include <deal.II/base/symmetric_tensor.h>
#include <deal.II/hp/dof_handler.h>
-#include <boost/range/irange.hpp>
-
#include <algorithm>
#include <memory>
#include <type_traits>
* `q_point` taking on all valid indices for quadrature points, as defined
* by the quadrature rule passed to `fe_values`.
*/
- boost::integer_range<unsigned int>
+ std_cxx20::ranges::iota_view<unsigned int>
quadrature_point_indices() const;
/**
template <int dim, int spacedim>
-inline boost::integer_range<unsigned int>
+inline std_cxx20::ranges::iota_view<unsigned int>
FEValuesBase<dim, spacedim>::quadrature_point_indices() const
{
- return boost::irange(0U, n_quadrature_points);
+ return std_cxx20::ranges::iota_view<unsigned int>(0U, n_quadrature_points);
}