From a565c7def7a4ad93f75766a2fd51b64275a5f4b4 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 25 May 2018 17:31:35 -0500 Subject: [PATCH] RCM: Update matrix_free, part 2: cuda_matrix_free --- .../deal.II/matrix_free/cuda_matrix_free.h | 29 ++++++++++--------- .../matrix_free/cuda_matrix_free.templates.h | 25 ++++++++-------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/deal.II/matrix_free/cuda_matrix_free.h b/include/deal.II/matrix_free/cuda_matrix_free.h index f114cf12a1..eff78e5974 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.h @@ -30,7 +30,7 @@ # include # include -# include +# include # include # include @@ -153,26 +153,27 @@ namespace CUDAWrappers /** * Extracts the information needed to perform loops over cells. The - * DoFHandler and ConstraintMatrix describe the layout of degrees of - * freedom, the DoFHandler and the mapping describe the transformation from - * unit to real cell, and the finite element underlying the DoFHandler - * together with the quadrature formula describe the local operations. + * DoFHandler and AffineConstraints objects describe the layout of + * degrees of freedom, the DoFHandler and the mapping describe the + * transformation from unit to real cell, and the finite element + * underlying the DoFHandler together with the quadrature formula + * describe the local operations. */ void - reinit(const Mapping & mapping, - const DoFHandler & dof_handler, - const ConstraintMatrix &constraints, - const Quadrature<1> & quad, - const AdditionalData additional_data = AdditionalData()); + reinit(const Mapping & mapping, + const DoFHandler & dof_handler, + const AffineConstraints &constraints, + const Quadrature<1> & quad, + const AdditionalData additional_data = AdditionalData()); /** * Initializes the data structures. Same as above but using a Q1 mapping. */ void - reinit(const DoFHandler & dof_handler, - const ConstraintMatrix &constraints, - const Quadrature<1> & quad, - const AdditionalData AdditionalData = AdditionalData()); + reinit(const DoFHandler & dof_handler, + const AffineConstraints &constraints, + const Quadrature<1> & quad, + const AdditionalData AdditionalData = AdditionalData()); /** * Return the Data structure associated with @p color. diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index 3bfc11dfcb..b6317153fa 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -381,12 +381,12 @@ namespace CUDAWrappers - template + template std::vector get_conflict_indices( const FilteredIterator::active_cell_iterator> - & cell, - const ConstraintMatrix &constraints) + & cell, + const AffineConstraints &constraints) { std::vector local_dof_indices( cell->get_fe().dofs_per_cell); @@ -476,11 +476,11 @@ namespace CUDAWrappers template void - MatrixFree::reinit(const Mapping & mapping, - const DoFHandler & dof_handler, - const ConstraintMatrix &constraints, - const Quadrature<1> & quad, - const AdditionalData additional_data) + MatrixFree::reinit(const Mapping & mapping, + const DoFHandler & dof_handler, + const AffineConstraints &constraints, + const Quadrature<1> & quad, + const AdditionalData additional_data) { if (typeid(Number) == typeid(double)) cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeEightByte); @@ -550,11 +550,10 @@ namespace CUDAWrappers CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end()); typedef std::function( CellFilter const &)> - fun_type; - const fun_type &fun = - static_cast(std::bind(&internal::get_conflict_indices, - std::placeholders::_1, - constraints)); + fun_type; + const auto fun = [&](const CellFilter &filter) { + return internal::get_conflict_indices(filter, constraints); + }; std::vector> graph = GraphColoring::make_graph_coloring(begin, end, fun); -- 2.39.5