unsigned int
my_count = std::count_if (criteria.begin(),
criteria.end(),
- std::bind2nd (std::greater<double>(),
- test_threshold));
+ std_cxx11::bind (&std::greater<double>,
+ std_cxx11::_1,
+ test_threshold));
unsigned int total_count;
MPI_Reduce (&my_count, &total_count, 1, MPI_UNSIGNED,
// now compute the requested representation
const types::global_dof_index n_global_parm_dofs
= std::count_if (weight_mapping.begin(), weight_mapping.end(),
- std::bind2nd (std::not_equal_to<types::global_dof_index> (), numbers::invalid_dof_index));
+ std_cxx11::bind (std::not_equal_to<types::global_dof_index>(), std_cxx11::_1, numbers::invalid_dof_index));
// first construct the inverse mapping of weight_mapping
std::vector<types::global_dof_index> inverse_weight_mapping (n_global_parm_dofs,
{
this->set_primitivity(std::find_if (n_nonzero_components_table.begin(),
n_nonzero_components_table.end(),
- std::bind2nd(std::not_equal_to<unsigned int>(),
- 1U))
+ std_cxx11::bind (std::not_equal_to<unsigned int>(),
+ std_cxx11::_1,
+ 1U))
== n_nonzero_components_table.end());
// if not put the whole thing
// back and return
if (std::find_if (line.begin(), line.end(),
- std::bind2nd (std::not_equal_to<char>(),' '))
+ std_cxx11::bind (std::not_equal_to<char>(),std_cxx11::_1,' '))
!= line.end())
{
in.putback ('\n');
for (int i = 0; i<4; ++i)
{
std::transform(inquads.begin(),inquads.end(),
- std::back_inserter(sides), std::bind2nd(QuadSide(),i));
+ std::back_inserter(sides), std_cxx11::bind(QuadSide(),std_cxx11::_1,i));
}
//Change each edge so that v0<v1
const unsigned int used_cells
= std::count_if (triangulation.levels[level+1]->cells.used.begin(),
triangulation.levels[level+1]->cells.used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// reserve space for the used_cells cells already existing
// on the next higher level as well as for the
// vertices are already in use
needed_vertices += std::count_if (triangulation.vertices_used.begin(),
triangulation.vertices_used.end(),
- std::bind2nd (std::equal_to<bool>(),
- true));
+ std_cxx11::bind (std::equal_to<bool>(),
+ std_cxx11::_1,
+ true));
// if we need more vertices: create them, if not: leave the
// array as is, since shrinking is not really possible because
// some of the vertices at the end may be in use
const unsigned int used_cells
= std::count_if (triangulation.levels[level+1]->cells.used.begin(),
triangulation.levels[level+1]->cells.used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// reserve space for the used_cells cells already existing
// add to needed vertices how many vertices are already in use
needed_vertices += std::count_if (triangulation.vertices_used.begin(), triangulation.vertices_used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// if we need more vertices: create them, if not: leave the
// array as is, since shrinking is not really possible because
// some of the vertices at the end may be in use
const unsigned int used_cells
= std::count_if (triangulation.levels[level+1]->cells.used.begin(),
triangulation.levels[level+1]->cells.used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// reserve space for the used_cells cells already existing
// add to needed vertices how many vertices are already in use
needed_vertices += std::count_if (triangulation.vertices_used.begin(), triangulation.vertices_used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// if we need more vertices: create them, if not: leave the
// array as is, since shrinking is not really possible because
// some of the vertices at the end may be in use
Triangulation<dim, spacedim>::n_used_vertices () const
{
return std::count_if (vertices_used.begin(), vertices_used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
}
// ---------------------------------------------------------------------
#include <deal.II/base/memory_consumption.h>
+#include <deal.II/base/std_cxx11/bind.h>
#include <deal.II/grid/tria_objects.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
const unsigned int new_size = new_hexes +
std::count_if (used.begin(),
used.end(),
- std::bind2nd (std::equal_to<bool>(), true));
+ std_cxx11::bind (std::equal_to<bool>(), std_cxx11::_1, true));
// see above...
if (new_size>cells.size())
std::transform (tria->levels[i]->cells.children.begin (),
tria->levels[i]->cells.children.end (),
has_children_level->begin (),
- std::bind2nd (std::not_equal_to<int>(), -1));
+ std_cxx11::bind(std::not_equal_to<int>(),
+ std_cxx11::_1,
+ -1));
else
std::transform (tria->levels[i]->cells.refinement_cases.begin (),
tria->levels[i]->cells.refinement_cases.end (),
has_children_level->begin (),
- std::bind2nd (std::not_equal_to<unsigned char>(),
- static_cast<unsigned char>(RefinementCase<dim>::no_refinement)));
+ std_cxx11::bind (std::not_equal_to<unsigned char>(),
+ std_cxx11::_1,
+ static_cast<unsigned char>(RefinementCase<dim>::no_refinement)));
has_children.push_back (has_children_level);
}
const std::size_t nonzero_elements
= std::count_if (&colnums[rowstart[0]],
&colnums[rowstart[rows]],
- std::bind2nd(std::not_equal_to<size_type>(), invalid_entry));
+ std_cxx11::bind(std::not_equal_to<size_type>(), std_cxx11::_1, invalid_entry));
// now allocate the respective memory
size_type *new_colnums = new size_type[nonzero_elements];
last_round_dofs[i] = numbers::invalid_size_type;
std::remove_if (last_round_dofs.begin(), last_round_dofs.end(),
- std::bind2nd(std::equal_to<DynamicSparsityPattern::size_type>(),
- numbers::invalid_size_type));
+ std_cxx11::bind(std::equal_to<DynamicSparsityPattern::size_type>(),
+ std_cxx11::_1,
+ numbers::invalid_size_type));
// now if no valid points remain: find dof with lowest coordination number
if (last_round_dofs.empty())
// copy_indices.
const types::global_dof_index n_active_dofs =
std::count_if (temp_copy_indices.begin(), temp_copy_indices.end(),
- std::bind2nd(std::not_equal_to<types::global_dof_index>(),
- numbers::invalid_dof_index));
+ std_cxx11::bind (std::not_equal_to<types::global_dof_index>(),
+ std_cxx11::_1,
+ numbers::invalid_dof_index));
copy_indices[selected_block][level].resize (n_active_dofs);
types::global_dof_index counter = 0;
for (types::global_dof_index i=0; i<temp_copy_indices.size(); ++i)
const types::global_dof_index n_active_dofs =
std::count_if (temp_copy_indices[block].begin(),
temp_copy_indices[block].end(),
- std::bind2nd(std::not_equal_to<types::global_dof_index>(),
- numbers::invalid_dof_index));
+ std_cxx11::bind (std::not_equal_to<types::global_dof_index>(),
+ std_cxx11::_1,
+ numbers::invalid_dof_index));
copy_indices[block][level].resize (n_active_dofs);
types::global_dof_index counter = 0;
for (types::global_dof_index i=0; i<temp_copy_indices[block].size(); ++i)
// global to level dofs
const types::global_dof_index n_active_dofs =
std::count_if (temp_copy_indices.begin(), temp_copy_indices.end(),
- std::bind2nd(std::not_equal_to<types::global_dof_index>(),
- numbers::invalid_dof_index));
+ std_cxx11::bind (std::not_equal_to<types::global_dof_index>(),
+ std_cxx11::_1,
+ numbers::invalid_dof_index));
copy_to_and_from_indices[level].resize (n_active_dofs);
types::global_dof_index counter = 0;
for (types::global_dof_index i=0; i<temp_copy_indices.size(); ++i)