From: Peter Munch Date: Sun, 18 Sep 2022 12:10:57 +0000 (+0200) Subject: internal::MatrixFreeFunctions::ConstraintInfo: switch data type X-Git-Tag: v9.5.0-rc1~960^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01c1cf6649ae3f7d2b0263ba7e5be4784bf82d97;p=dealii.git internal::MatrixFreeFunctions::ConstraintInfo: switch data type --- diff --git a/include/deal.II/matrix_free/constraint_info.h b/include/deal.II/matrix_free/constraint_info.h index 44a13c9f65..91c735c36f 100644 --- a/include/deal.II/matrix_free/constraint_info.h +++ b/include/deal.II/matrix_free/constraint_info.h @@ -77,13 +77,13 @@ namespace internal template void - read_write_operation(const T & operation, - VectorType & global_vector, - AlignedVector &local_vector, - const unsigned int first_cell, - const unsigned int n_cells, - const unsigned int n_dofs_per_cell, - const bool apply_constraints) const; + read_write_operation(const T & operation, + VectorType & global_vector, + Number * local_vector, + const unsigned int first_cell, + const unsigned int n_cells, + const unsigned int n_dofs_per_cell, + const bool apply_constraints) const; void apply_hanging_node_constraints( @@ -457,13 +457,13 @@ namespace internal template inline void ConstraintInfo::read_write_operation( - const T & operation, - VectorType & global_vector, - AlignedVector &local_vector, - const unsigned int first_cell, - const unsigned int n_cells, - const unsigned int n_dofs_per_cell, - const bool apply_constraints) const + const T & operation, + VectorType & global_vector, + Number * local_vector, + const unsigned int first_cell, + const unsigned int n_cells, + const unsigned int n_dofs_per_cell, + const bool apply_constraints) const { if (apply_constraints == false) { diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index ce715bcf46..08de0842e9 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -2557,7 +2557,7 @@ MGTwoLevelTransfer>:: internal::VectorReader reader; constraint_info.read_write_operation(reader, *vec_coarse_ptr, - evaluation_data_coarse, + evaluation_data_coarse.data(), cell_counter, n_lanes_filled, scheme.n_dofs_per_cell_coarse, @@ -2761,7 +2761,7 @@ MGTwoLevelTransfer>:: cell_counter, n_lanes_filled, true, evaluation_data_coarse); constraint_info.read_write_operation(writer, *vec_coarse_ptr, - evaluation_data_coarse, + evaluation_data_coarse.data(), cell_counter, n_lanes_filled, scheme.n_dofs_per_cell_coarse, @@ -2894,7 +2894,7 @@ MGTwoLevelTransfer>:: internal::VectorSetter writer; constraint_info.read_write_operation(writer, *vec_coarse_ptr, - evaluation_data_coarse, + evaluation_data_coarse.data(), cell_counter, n_lanes_filled, scheme.n_dofs_per_cell_coarse, diff --git a/tests/matrix_free/constraint_info_01.cc b/tests/matrix_free/constraint_info_01.cc index 2cc5a69ec4..5047b6cc7d 100644 --- a/tests/matrix_free/constraint_info_01.cc +++ b/tests/matrix_free/constraint_info_01.cc @@ -133,8 +133,13 @@ main() const unsigned int n_cells, const unsigned int n_dofs_per_cell) { internal::VectorReader reader; - constraint_info.read_write_operation( - reader, src, local_vector, first_cell, n_cells, n_dofs_per_cell, true); + constraint_info.read_write_operation(reader, + src, + local_vector.data(), + first_cell, + n_cells, + n_dofs_per_cell, + true); constraint_info.apply_hanging_node_constraints(first_cell, n_cells, false, @@ -151,24 +156,39 @@ main() n_cells, true, local_vector); - constraint_info.read_write_operation( - writer, dst, local_vector, first_cell, n_cells, n_dofs_per_cell, true); + constraint_info.read_write_operation(writer, + dst, + local_vector.data(), + first_cell, + n_cells, + n_dofs_per_cell, + true); }; const auto read_dof_values_plain = [&](const unsigned int first_cell, const unsigned int n_cells, const unsigned int n_dofs_per_cell) { internal::VectorReader reader; - constraint_info.read_write_operation( - reader, src, local_vector, first_cell, n_cells, n_dofs_per_cell, false); + constraint_info.read_write_operation(reader, + src, + local_vector.data(), + first_cell, + n_cells, + n_dofs_per_cell, + false); }; const auto set_dof_values_plain = [&](const unsigned int first_cell, const unsigned int n_cells, const unsigned int n_dofs_per_cell) { internal::VectorSetter writer; - constraint_info.read_write_operation( - writer, dst, local_vector, first_cell, n_cells, n_dofs_per_cell, false); + constraint_info.read_write_operation(writer, + dst, + local_vector.data(), + first_cell, + n_cells, + n_dofs_per_cell, + false); }; unsigned int first_cell = 0;