ff(begin, end);
# endif
#else
- internal::parallel_for(
- begin,
- end,
- std::bind(&internal::apply_to_subranges<RangeType, Function>,
- std::placeholders::_1,
- std::cref(f)),
- grainsize);
+ internal::parallel_for(begin,
+ end,
+ [&f](const tbb::blocked_range<RangeType> &range) {
+ internal::apply_to_subranges<RangeType, Function>(
+ range, f);
+ },
+ grainsize);
#endif
}
data_storage = &data_storage_;
handle = triangulation->register_data_attach(
- std::bind(
- &ContinuousQuadratureDataTransfer<dim, DataType>::pack_function,
- this,
- std::placeholders::_1,
- std::placeholders::_2),
+ [this](
+ const typename parallel::distributed::Triangulation<
+ dim>::cell_iterator &cell,
+ const typename parallel::distributed::Triangulation<dim>::CellStatus
+ status) { return this->pack_function(cell, status); },
/*returns_variable_size_data=*/true);
}
{
triangulation->notify_ready_to_unpack(
handle,
- std::bind(
- &ContinuousQuadratureDataTransfer<dim, DataType>::unpack_function,
- this,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3));
+ [this](
+ const typename parallel::distributed::Triangulation<
+ dim>::cell_iterator &cell,
+ const typename parallel::distributed::Triangulation<dim>::CellStatus
+ status,
+ const boost::iterator_range<std::vector<char>::const_iterator>
+ &data_range) { this->unpack_function(cell, status, data_range); });
// invalidate the pointers
data_storage = nullptr;
// Solve the nonlinear system using Newton's method
const double new_t = t + this->c[i] * delta_t;
const double new_delta_t = this->a[i][i] * delta_t;
+ VectorType & f_stage = f_stages[i];
newton_solve(
- std::bind(&ImplicitRungeKutta<VectorType>::compute_residual,
- this,
- f,
- new_t,
- new_delta_t,
- std::cref(old_y),
- std::placeholders::_1,
- std::ref(f_stages[i]),
- std::placeholders::_2),
- std::bind(
- id_minus_tau_J_inverse, new_t, new_delta_t, std::placeholders::_1),
+ [this, &f, new_t, new_delta_t, &old_y, &f_stage](
+ const VectorType &y, VectorType &residual) {
+ this->compute_residual(
+ f, new_t, new_delta_t, old_y, y, f_stage, residual);
+ },
+ [&id_minus_tau_J_inverse, new_t, new_delta_t](const VectorType &y) {
+ return id_minus_tau_J_inverse(new_t, new_delta_t, y);
+ },
y);
}
}
parallel::internal::parallel_for(
colored_iterators[color].begin(),
colored_iterators[color].end(),
- std::bind(&WorkerAndCopier::operator(),
- std::ref(worker_and_copier),
- std::placeholders::_1),
+ [&worker_and_copier](
+ const tbb::blocked_range<
+ typename std::vector<Iterator>::const_iterator> &range) {
+ worker_and_copier(range);
+ },
chunk_size);
}
}
// forward to the other function
run(begin,
end,
- std::bind(worker,
- std::ref(main_object),
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3),
- std::bind(copier, std::ref(main_object), std::placeholders::_1),
+ [&main_object, worker](const Iterator &iterator,
+ ScratchData & scratch_data,
+ CopyData & copy_data) {
+ (main_object.*worker)(iterator, scratch_data, copy_data);
+ },
+ [&main_object, copier](const CopyData ©_data) {
+ (main_object.*copier)(copy_data);
+ },
sample_scratch_data,
sample_copy_data,
queue_length,
// forward to the other function
run(begin,
end,
- std::bind(worker,
- std::ref(main_object),
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3),
- std::bind(copier, std::ref(main_object), std::placeholders::_1),
+ [&main_object, worker](const Iterator &iterator,
+ ScratchData & scratch_data,
+ CopyData & copy_data) {
+ (main_object.*worker)(iterator, scratch_data, copy_data);
+ },
+ [&main_object, copier](const CopyData ©_data) {
+ (main_object.*copier)(copy_data);
+ },
sample_scratch_data,
sample_copy_data,
queue_length,
Assert(tria != nullptr, ExcInternalError());
handle = tria->register_data_attach(
- std::bind(&CellDataTransfer<dim, spacedim, VectorType>::pack_callback,
- this,
- std::placeholders::_1,
- std::placeholders::_2),
+ [this](const typename parallel::distributed::
+ Triangulation<dim, spacedim>::cell_iterator &cell,
+ const typename parallel::distributed::
+ Triangulation<dim, spacedim>::CellStatus status) {
+ return this->pack_callback(cell, status);
+ },
/*returns_variable_size_data=*/transfer_variable_size_data);
}
tria->notify_ready_to_unpack(
handle,
- std::bind(&CellDataTransfer<dim, spacedim, VectorType>::unpack_callback,
- this,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::ref(all_out)));
+ [this, &all_out](
+ const typename parallel::distributed::Triangulation<dim, spacedim>::
+ cell_iterator &cell,
+ const typename parallel::distributed::Triangulation<dim, spacedim>::
+ CellStatus status,
+ const boost::iterator_range<std::vector<char>::const_iterator>
+ &data_range) {
+ this->unpack_callback(cell, status, data_range, all_out);
+ });
dealii::internal::parallel::distributed::CellDataTransferImplementation::
post_unpack_action(all_out);
parallel::apply_to_subranges(
0U,
matrix_size,
- std::bind(&internal::ChunkSparseMatrixImplementation::
- template zero_subrange<number>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get()),
+ [this](const unsigned int begin, const unsigned int end) {
+ internal::ChunkSparseMatrixImplementation::zero_subrange(begin,
+ end,
+ val.get());
+ },
grain_size);
else if (matrix_size > 0)
std::memset(val.get(), 0, matrix_size * sizeof(number));
return std::count_if(val.get(),
val.get() + cols->sparsity_pattern.n_nonzero_elements() *
chunk_size * chunk_size,
- std::bind(std::not_equal_to<double>(),
- std::placeholders::_1,
- 0));
+ [](const double element) { return element != 0.; });
}
parallel::apply_to_subranges(
0U,
cols->sparsity_pattern.n_rows(),
- std::bind(&internal::ChunkSparseMatrixImplementation::
- vmult_add_on_subrange<number, InVector, OutVector>,
- std::cref(*cols),
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->sparsity_pattern.rowstart.get(),
- cols->sparsity_pattern.colnums.get(),
- std::cref(src),
- std::ref(dst)),
+ [this, &src, &dst](const unsigned int begin_row,
+ const unsigned int end_row) {
+ internal::ChunkSparseMatrixImplementation::vmult_add_on_subrange(
+ *cols,
+ begin_row,
+ end_row,
+ val.get(),
+ cols->sparsity_pattern.rowstart.get(),
+ cols->sparsity_pattern.colnums.get(),
+ src,
+ dst);
+ },
internal::SparseMatrixImplementation::minimum_parallel_grain_size /
cols->chunk_size +
1);
internal::PreconditionChebyshevImplementation::EigenvalueTracker
eigenvalue_tracker;
SolverCG<VectorType> solver(control);
- solver.connect_eigenvalues_slot(std::bind(
- &internal::PreconditionChebyshevImplementation::EigenvalueTracker::slot,
- &eigenvalue_tracker,
- std::placeholders::_1));
+ solver.connect_eigenvalues_slot(
+ [&eigenvalue_tracker](const std::vector<double> &eigenvalues) {
+ eigenvalue_tracker.slot(eigenvalues);
+ });
// set an initial guess which is close to the constant vector but where
// one entry is different to trigger high frequencies
else
{
// compute blocks in parallel
- parallel::apply_to_subranges(
- 0,
- this->additional_data->block_list.n_rows(),
- std::bind(&RelaxationBlock<MatrixType, InverseNumberType, VectorType>::
- block_kernel,
- this,
- std::placeholders::_1,
- std::placeholders::_2),
- 16);
+ parallel::apply_to_subranges(0,
+ this->additional_data->block_list.n_rows(),
+ [this](const size_type block_begin,
+ const size_type block_end) {
+ this->block_kernel(block_begin, block_end);
+ },
+ 16);
}
this->inverses_computed(true);
}
// only takes two arguments, the iteration and the check_value, and so
// we simply ignore the third argument that is passed in whenever the
// signal is executed
- connect(std::bind(&SolverControl::check,
- std::ref(solver_control),
- std::placeholders::_1,
- std::placeholders::_2));
+ connect([&solver_control](const unsigned int iteration,
+ const double check_value,
+ const VectorType &) {
+ return solver_control.check(iteration, check_value);
+ });
}
// only takes two arguments, the iteration and the check_value, and so
// we simply ignore the third argument that is passed in whenever the
// signal is executed
- connect(std::bind(&SolverControl::check,
- std::ref(solver_control),
- std::placeholders::_1,
- std::placeholders::_2));
+ connect([&solver_control](const unsigned int iteration,
+ const double check_value,
+ const VectorType &) {
+ return solver_control.check(iteration, check_value);
+ });
}
parallel::apply_to_subranges(
0U,
matrix_size,
- std::bind(
- &internal::SparseMatrixImplementation::template zero_subrange<number>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get()),
+ [this](const size_type begin, const size_type end) {
+ internal::SparseMatrixImplementation::zero_subrange(begin,
+ end,
+ val.get());
+ },
grain_size);
else if (matrix_size > 0)
{
parallel::apply_to_subranges(
0U,
m(),
- std::bind(&internal::SparseMatrixImplementation::
- vmult_on_subrange<number, InVector, OutVector>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->rowstart.get(),
- cols->colnums.get(),
- std::cref(src),
- std::ref(dst),
- false),
+ [this, &src, &dst](const size_type begin_row, const size_type end_row) {
+ internal::SparseMatrixImplementation::vmult_on_subrange(
+ begin_row,
+ end_row,
+ val.get(),
+ cols->rowstart.get(),
+ cols->colnums.get(),
+ src,
+ dst,
+ false);
+ },
internal::SparseMatrixImplementation::minimum_parallel_grain_size);
}
parallel::apply_to_subranges(
0U,
m(),
- std::bind(&internal::SparseMatrixImplementation::
- vmult_on_subrange<number, InVector, OutVector>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->rowstart.get(),
- cols->colnums.get(),
- std::cref(src),
- std::ref(dst),
- true),
+ [this, &src, &dst](const size_type begin_row, const size_type end_row) {
+ internal::SparseMatrixImplementation::vmult_on_subrange(
+ begin_row,
+ end_row,
+ val.get(),
+ cols->rowstart.get(),
+ cols->colnums.get(),
+ src,
+ dst,
+ true);
+ },
internal::SparseMatrixImplementation::minimum_parallel_grain_size);
}
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
return parallel::accumulate_from_subranges<somenumber>(
- std::bind(&internal::SparseMatrixImplementation::
- matrix_norm_sqr_on_subrange<number, Vector<somenumber>>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->rowstart.get(),
- cols->colnums.get(),
- std::cref(v)),
+ [this, &v](const size_type begin_row, const size_type end_row) {
+ return internal::SparseMatrixImplementation::matrix_norm_sqr_on_subrange(
+ begin_row,
+ end_row,
+ val.get(),
+ cols->rowstart.get(),
+ cols->colnums.get(),
+ v);
+ },
0,
m(),
internal::SparseMatrixImplementation::minimum_parallel_grain_size);
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
return parallel::accumulate_from_subranges<somenumber>(
- std::bind(&internal::SparseMatrixImplementation::
- matrix_scalar_product_on_subrange<number, Vector<somenumber>>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->rowstart.get(),
- cols->colnums.get(),
- std::cref(u),
- std::cref(v)),
+ [this, &u, &v](const size_type begin_row, const size_type end_row) {
+ return internal::SparseMatrixImplementation::
+ matrix_scalar_product_on_subrange(begin_row,
+ end_row,
+ val.get(),
+ cols->rowstart.get(),
+ cols->colnums.get(),
+ u,
+ v);
+ },
0,
m(),
internal::SparseMatrixImplementation::minimum_parallel_grain_size);
Assert(&u != &dst, ExcSourceEqualsDestination());
return std::sqrt(parallel::accumulate_from_subranges<somenumber>(
- std::bind(&internal::SparseMatrixImplementation::residual_sqr_on_subrange<
- number,
- Vector<somenumber>,
- Vector<somenumber>>,
- std::placeholders::_1,
- std::placeholders::_2,
- val.get(),
- cols->rowstart.get(),
- cols->colnums.get(),
- std::cref(u),
- std::cref(b),
- std::ref(dst)),
+ [this, &u, &b, &dst](const size_type begin_row, const size_type end_row) {
+ return internal::SparseMatrixImplementation::residual_sqr_on_subrange(
+ begin_row,
+ end_row,
+ val.get(),
+ cols->rowstart.get(),
+ cols->colnums.get(),
+ u,
+ b,
+ dst);
+ },
0,
m(),
internal::SparseMatrixImplementation::minimum_parallel_grain_size));
n_rows / internal::bucket_size_threading + 1);
parallel::apply_to_subranges(0,
task_info.n_active_cells,
- std::bind(&internal::compute_row_lengths,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(*this),
- std::ref(mutexes),
- std::ref(row_lengths)),
+ [this,
+ &mutexes,
+ &row_lengths](const unsigned int begin,
+ const unsigned int end) {
+ internal::compute_row_lengths(
+ begin, end, *this, mutexes, row_lengths);
+ },
20);
// disregard dofs that only sit on a single cell because they cannot
SparsityPattern connectivity_dof(n_rows,
task_info.n_active_cells,
row_lengths);
- parallel::apply_to_subranges(0,
- task_info.n_active_cells,
- std::bind(&internal::fill_connectivity_dofs,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(*this),
- std::cref(row_lengths),
- std::ref(mutexes),
- std::ref(connectivity_dof)),
- 20);
+ parallel::apply_to_subranges(
+ 0,
+ task_info.n_active_cells,
+ [this, &row_lengths, &mutexes, &connectivity_dof](
+ const unsigned int begin, const unsigned int end) {
+ internal::fill_connectivity_dofs(
+ begin, end, *this, row_lengths, mutexes, connectivity_dof);
+ },
+ 20);
connectivity_dof.compress();
// create a connectivity list between cells. The connectivity graph
// should apply the renumbering, i.e., the entry for cell j is the entry
// for cell renumbering[j] in the original ordering.
- parallel::apply_to_subranges(0,
- task_info.n_active_cells,
- std::bind(&internal::fill_connectivity,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(*this),
- std::cref(reverse_numbering),
- std::cref(connectivity_dof),
- std::ref(connectivity)),
- 20);
+ parallel::apply_to_subranges(
+ 0,
+ task_info.n_active_cells,
+ [this, &reverse_numbering, &connectivity_dof, &connectivity](
+ const unsigned int begin, const unsigned int end) {
+ internal::fill_connectivity(begin,
+ end,
+ *this,
+ reverse_numbering,
+ connectivity_dof,
+ connectivity);
+ },
+ 20);
}
tbb::concurrent_unordered_map<std::pair<unsigned int, unsigned int>,
unsigned int>
map;
- parallel::apply_to_subranges(0,
- cell_level_index.size(),
- std::bind(&internal::fill_index_subrange,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(cell_level_index),
- std::ref(map)),
- 50);
+ parallel::apply_to_subranges(
+ 0,
+ cell_level_index.size(),
+ [this, &map](const unsigned int begin, const unsigned int end) {
+ internal::fill_index_subrange(begin, end, cell_level_index, map);
+ },
+ 50);
// step 2: Make a list for all blocks with other blocks that write to the
// cell (due to the faces that are associated to it)
parallel::apply_to_subranges(
0,
task_info.n_active_cells,
- std::bind(&internal::fill_connectivity_subrange<dim>,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(tria),
- std::cref(cell_level_index),
- std::cref(map),
- std::ref(connectivity_direct)),
+ [this, &tria, &map, &connectivity_direct](const unsigned int begin,
+ const unsigned int end) {
+ internal::fill_connectivity_subrange<dim>(
+ begin, end, tria, cell_level_index, map, connectivity_direct);
+ },
20);
connectivity_direct.symmetrize();
parallel::apply_to_subranges(
0,
task_info.n_active_cells,
- std::bind(&internal::fill_connectivity_indirect_subrange,
- std::placeholders::_1,
- std::placeholders::_2,
- std::cref(connectivity_direct),
- std::ref(connectivity)),
+ [&connectivity_direct, &connectivity](const unsigned int begin,
+ const unsigned int end) {
+ internal::fill_connectivity_indirect_subrange(begin,
+ end,
+ connectivity_direct,
+ connectivity);
+ },
20);
#endif
}
WorkStream::run(
begin,
end,
- std::bind(&cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>,
- std::placeholders::_1,
- std::placeholders::_3,
- std::placeholders::_2,
- cell_worker,
- boundary_worker,
- face_worker,
- lctrl),
- std::bind(&dealii::internal::assemble<dim, DOFINFO, ASSEMBLER>,
- std::placeholders::_1,
- &assembler),
+ [&cell_worker, &boundary_worker, &face_worker, &lctrl](
+ ITERATOR cell, INFOBOX &info, DoFInfoBox<dim, DOFINFO> &dof_info) {
+ cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>(cell,
+ dof_info,
+ info,
+ cell_worker,
+ boundary_worker,
+ face_worker,
+ lctrl);
+ },
+ [&assembler](const MeshWorker::DoFInfoBox<dim, DOFINFO> &dinfo) {
+ dealii::internal::assemble<dim, DOFINFO, ASSEMBLER>(dinfo, &assembler);
+ },
info,
dof_info);
}
IntegrationInfo<dim, spacedim> &)>
face_worker;
if (integrator.use_cell)
- cell_worker = std::bind(&LocalIntegrator<dim, spacedim>::cell,
- &integrator,
- std::placeholders::_1,
- std::placeholders::_2);
+ cell_worker =
+ [&integrator](DoFInfo<dim, spacedim> & dof_info,
+ IntegrationInfo<dim, spacedim> &integration_info) {
+ integrator.cell(dof_info, integration_info);
+ };
if (integrator.use_boundary)
- boundary_worker = std::bind(&LocalIntegrator<dim, spacedim>::boundary,
- &integrator,
- std::placeholders::_1,
- std::placeholders::_2);
+ boundary_worker =
+ [&integrator](DoFInfo<dim, spacedim> & dof_info,
+ IntegrationInfo<dim, spacedim> &integration_info) {
+ integrator.boundary(dof_info, integration_info);
+ };
if (integrator.use_face)
- face_worker = std::bind(&LocalIntegrator<dim, spacedim>::face,
- &integrator,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::placeholders::_4);
+ face_worker =
+ [&integrator](DoFInfo<dim, spacedim> & dof_info_1,
+ DoFInfo<dim, spacedim> & dof_info_2,
+ IntegrationInfo<dim, spacedim> &integration_info_1,
+ IntegrationInfo<dim, spacedim> &integration_info_2) {
+ integrator.face(dof_info_1,
+ dof_info_2,
+ integration_info_1,
+ integration_info_2);
+ };
loop<dim, spacedim>(begin,
end,
f_face_worker;
if (cell_worker != nullptr)
- f_cell_worker = std::bind(cell_worker,
- std::ref(main_class),
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3);
+ f_cell_worker = [&main_class,
+ cell_worker](const CellIteratorType &cell_iterator,
+ ScratchData & scratch_data,
+ CopyData & copy_data) {
+ (main_class.*cell_worker)(cell_iterator, scratch_data, copy_data);
+ };
if (boundary_worker != nullptr)
- f_boundary_worker = std::bind(boundary_worker,
- std::ref(main_class),
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::placeholders::_4);
+ f_boundary_worker =
+ [&main_class, boundary_worker](const CellIteratorType &cell_iterator,
+ const unsigned int face_no,
+ ScratchData & scratch_data,
+ CopyData & copy_data) {
+ (main_class.*
+ boundary_worker)(cell_iterator, face_no, scratch_data, copy_data);
+ };
if (face_worker != nullptr)
- f_face_worker = std::bind(face_worker,
- std::ref(main_class),
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::placeholders::_4,
- std::placeholders::_5,
- std::placeholders::_6,
- std::placeholders::_7,
- std::placeholders::_8);
+ f_face_worker = [&main_class,
+ face_worker](const CellIteratorType &cell_iterator_1,
+ const unsigned int face_index_1,
+ const unsigned int subface_index_1,
+ const CellIteratorType &cell_iterator_2,
+ const unsigned int face_index_2,
+ const unsigned int subface_index_2,
+ ScratchData & scratch_data,
+ CopyData & copy_data) {
+ (main_class.*face_worker)(cell_iterator_1,
+ face_index_1,
+ subface_index_1,
+ cell_iterator_2,
+ face_index_2,
+ subface_index_2,
+ scratch_data,
+ copy_data);
+ };
mesh_loop(begin,
end,
f_cell_worker,
- std::bind(copier, main_class, std::placeholders::_1),
+ [&main_class, copier](const CopyData ©_data) {
+ (main_class.*copier)(copy_data);
+ },
sample_scratch_data,
sample_copy_data,
flags,
dof_handler.begin_active(),
static_cast<typename DoFHandlerType::active_cell_iterator>(
dof_handler.end()),
- std::bind(&internal::estimate_one_cell<InputVector, DoFHandlerType>,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::ref(solutions),
- strategy),
- std::bind(&internal::copy_local_to_global<DoFHandlerType>,
- std::placeholders::_1,
- std::ref(face_integrals)),
+ [&solutions, strategy](
+ const typename DoFHandlerType::active_cell_iterator &cell,
+ internal::ParallelData<DoFHandlerType, typename InputVector::value_type>
+ ¶llel_data,
+ std::map<typename DoFHandlerType::face_iterator, std::vector<double>>
+ &local_face_integrals) {
+ internal::estimate_one_cell(
+ cell, parallel_data, local_face_integrals, solutions, strategy);
+ },
+ [&face_integrals](
+ const std::map<typename DoFHandlerType::face_iterator,
+ std::vector<double>> &local_face_integrals) {
+ internal::copy_local_to_global<DoFHandlerType>(local_face_integrals,
+ face_integrals);
+ },
parallel_data,
sample_local_face_integrals);
spacedim,
typename DoFHandler<dim, spacedim>::active_cell_iterator,
number>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
- std::placeholders::_1,
- &matrix,
- static_cast<Vector<number> *>(nullptr)),
+ [&matrix](const internal::AssemblerData::CopyData<number> &data) {
+ MatrixCreator::internal::copy_local_to_global(
+ data, &matrix, static_cast<Vector<number> *>(nullptr));
+ },
assembler_data,
copy_data);
}
spacedim,
typename DoFHandler<dim, spacedim>::active_cell_iterator,
number>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
- std::placeholders::_1,
- &matrix,
- &rhs_vector),
+ [&matrix,
+ &rhs_vector](const internal::AssemblerData::CopyData<number> &data) {
+ MatrixCreator::internal::copy_local_to_global(data,
+ &matrix,
+ &rhs_vector);
+ },
assembler_data,
copy_data);
}
spacedim,
typename hp::DoFHandler<dim, spacedim>::active_cell_iterator,
number>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
- std::placeholders::_1,
- &matrix,
- static_cast<Vector<number> *>(nullptr)),
+ [&matrix](const internal::AssemblerData::CopyData<number> &data) {
+ MatrixCreator::internal::copy_local_to_global(
+ data, &matrix, static_cast<Vector<number> *>(nullptr));
+ },
assembler_data,
copy_data);
}
spacedim,
typename hp::DoFHandler<dim, spacedim>::active_cell_iterator,
number>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
- std::placeholders::_1,
- &matrix,
- &rhs_vector),
+ [&matrix,
+ &rhs_vector](const internal::AssemblerData::CopyData<number> &data) {
+ MatrixCreator::internal::copy_local_to_global(data,
+ &matrix,
+ &rhs_vector);
+ },
assembler_data,
copy_data);
}
WorkStream::run(
dof.begin_active(),
dof.end(),
- static_cast<std::function<
- void(typename DoFHandler<dim, spacedim>::active_cell_iterator const &,
- MatrixCreator::internal::AssemblerBoundary::Scratch const &,
- MatrixCreator::internal::AssemblerBoundary::
- CopyData<DoFHandler<dim, spacedim>, number> &)>>(
- std::bind(
- &internal::create_boundary_mass_matrix_1<dim, spacedim, number>,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::cref(mapping),
- std::cref(fe),
- std::cref(q),
- std::cref(boundary_functions),
- coefficient,
- std::cref(component_mapping))),
- static_cast<std::function<void(
- MatrixCreator::internal::AssemblerBoundary ::
- CopyData<DoFHandler<dim, spacedim>, number> const &)>>(
- std::bind(&internal::copy_boundary_mass_matrix_1<dim, spacedim, number>,
- std::placeholders::_1,
- std::cref(boundary_functions),
- std::cref(dof_to_boundary_mapping),
- std::ref(matrix),
- std::ref(rhs_vector))),
+ [&mapping, &fe, &q, &boundary_functions, coefficient, &component_mapping](
+ typename DoFHandler<dim, spacedim>::active_cell_iterator const &cell,
+ MatrixCreator::internal::AssemblerBoundary::Scratch const &scratch_data,
+ MatrixCreator::internal::AssemblerBoundary::
+ CopyData<DoFHandler<dim, spacedim>, number> ©_data) {
+ internal::create_boundary_mass_matrix_1(cell,
+ scratch_data,
+ copy_data,
+ mapping,
+ fe,
+ q,
+ boundary_functions,
+ coefficient,
+ component_mapping);
+ },
+ [&boundary_functions, &dof_to_boundary_mapping, &matrix, &rhs_vector](
+ MatrixCreator::internal::AssemblerBoundary::
+ CopyData<DoFHandler<dim, spacedim>, number> const ©_data) {
+ internal::copy_boundary_mass_matrix_1(copy_data,
+ boundary_functions,
+ dof_to_boundary_mapping,
+ matrix,
+ rhs_vector);
+ },
scratch,
copy_data);
}
WorkStream::run(
dof.begin_active(),
dof.end(),
- static_cast<std::function<void(
- typename hp::DoFHandler<dim, spacedim>::active_cell_iterator const &,
- MatrixCreator::internal::AssemblerBoundary::Scratch const &,
- MatrixCreator::internal::AssemblerBoundary::
- CopyData<hp::DoFHandler<dim, spacedim>, number> &)>>(
- std::bind(
- &internal::create_hp_boundary_mass_matrix_1<dim, spacedim, number>,
- std::placeholders::_1,
- std::placeholders::_2,
- std::placeholders::_3,
- std::cref(mapping),
- std::cref(fe_collection),
- std::cref(q),
- std::cref(boundary_functions),
- coefficient,
- std::cref(component_mapping))),
- static_cast<std::function<void(
+ [&mapping,
+ &fe_collection,
+ &q,
+ &boundary_functions,
+ coefficient,
+ &component_mapping](
+ typename hp::DoFHandler<dim, spacedim>::active_cell_iterator const
+ & cell,
+ MatrixCreator::internal::AssemblerBoundary::Scratch const &scratch_data,
+ MatrixCreator::internal::AssemblerBoundary ::
+ CopyData<hp::DoFHandler<dim, spacedim>, number> ©_data) {
+ internal::create_hp_boundary_mass_matrix_1(cell,
+ scratch_data,
+ copy_data,
+ mapping,
+ fe_collection,
+ q,
+ boundary_functions,
+ coefficient,
+ component_mapping);
+ },
+ [&boundary_functions, &dof_to_boundary_mapping, &matrix, &rhs_vector](
MatrixCreator::internal::AssemblerBoundary ::
- CopyData<hp::DoFHandler<dim, spacedim>, number> const &)>>(
- std::bind(
- &internal::copy_hp_boundary_mass_matrix_1<dim, spacedim, number>,
- std::placeholders::_1,
- std::cref(boundary_functions),
- std::cref(dof_to_boundary_mapping),
- std::ref(matrix),
- std::ref(rhs_vector))),
+ CopyData<hp::DoFHandler<dim, spacedim>, number> const ©_data) {
+ internal::copy_hp_boundary_mass_matrix_1(copy_data,
+ boundary_functions,
+ dof_to_boundary_mapping,
+ matrix,
+ rhs_vector);
+ },
scratch,
copy_data);
}
dim,
spacedim,
typename DoFHandler<dim, spacedim>::active_cell_iterator>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
- std::placeholders::_1,
- &matrix,
- static_cast<Vector<double> *>(nullptr)),
+ [&matrix](const internal::AssemblerData::CopyData<double> &data) {
+ MatrixCreator::internal::copy_local_to_global(
+ data, &matrix, static_cast<Vector<double> *>(nullptr));
+ },
assembler_data,
copy_data);
}
dim,
spacedim,
typename DoFHandler<dim, spacedim>::active_cell_iterator>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
- std::placeholders::_1,
- &matrix,
- &rhs_vector),
+ [&matrix,
+ &rhs_vector](const internal::AssemblerData::CopyData<double> &data) {
+ MatrixCreator::internal::copy_local_to_global(data,
+ &matrix,
+ &rhs_vector);
+ },
assembler_data,
copy_data);
}
dim,
spacedim,
typename hp::DoFHandler<dim, spacedim>::active_cell_iterator>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
- std::placeholders::_1,
- &matrix,
- static_cast<Vector<double> *>(nullptr)),
+ [&matrix](const internal::AssemblerData::CopyData<double> &data) {
+ MatrixCreator::internal::copy_local_to_global(
+ data, &matrix, static_cast<Vector<double> *>(nullptr));
+ },
assembler_data,
copy_data);
}
dim,
spacedim,
typename hp::DoFHandler<dim, spacedim>::active_cell_iterator>,
- std::bind(
- &MatrixCreator::internal::
- copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
- std::placeholders::_1,
- &matrix,
- &rhs_vector),
+ [&matrix,
+ &rhs_vector](const internal::AssemblerData::CopyData<double> &data) {
+ MatrixCreator::internal::copy_local_to_global(data,
+ &matrix,
+ &rhs_vector);
+ },
assembler_data,
copy_data);
}