From 67101d558c46a790a4b9832ff7a52f093d09db15 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 21 Sep 2020 09:55:02 +0200 Subject: [PATCH] Convert a few tests to template parameter -1 --- tests/matrix_free/multigrid_dg_periodic.cc | 71 +++++++++++----------- tests/matrix_free/multigrid_dg_sip_01.cc | 71 +++++++++++----------- tests/matrix_free/multigrid_dg_sip_02.cc | 60 +++++++++--------- tests/matrix_free/step-48.cc | 28 ++++----- tests/matrix_free/step-48b.cc | 28 ++++----- tests/matrix_free/step-48c.cc | 28 ++++----- 6 files changed, 135 insertions(+), 151 deletions(-) diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index 1e2b6732a2..08d012120a 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -55,10 +55,7 @@ -template +template class LaplaceOperator : public Subscriptor { public: @@ -69,8 +66,11 @@ public: void initialize(const Mapping & mapping, const DoFHandler &dof_handler, + const unsigned int n_q_points_1d, const unsigned int level = numbers::invalid_unsigned_int) { + fe_degree = dof_handler.get_fe().degree; + const QGauss<1> quad(n_q_points_1d); typename MatrixFree::AdditionalData addit_data; addit_data.tasks_parallel_scheme = @@ -173,7 +173,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const { - FEEvaluation phi(data); + FEEvaluation phi(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { @@ -194,10 +194,8 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); - FEFaceEvaluation fe_eval_neighbor( - data, false); + FEFaceEvaluation fe_eval(data, true); + FEFaceEvaluation fe_eval_neighbor(data, false); for (unsigned int face = face_range.first; face < face_range.second; face++) { @@ -245,8 +243,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); + FEFaceEvaluation fe_eval(data, true); for (unsigned int face = face_range.first; face < face_range.second; face++) { fe_eval.reinit(face); @@ -299,13 +296,14 @@ private: const unsigned int &, const std::pair &cell_range) const { - FEEvaluation phi(data); + FEEvaluation phi(data); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) @@ -317,7 +315,7 @@ private: phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } - for (unsigned int i = 0; i < phi.static_dofs_per_cell; ++i) + for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) phi.begin_dof_values()[i] = local_diagonal_vector[i]; phi.distribute_local_to_global(dst); } @@ -330,16 +328,16 @@ private: const unsigned int &, const std::pair &face_range) const { - FEFaceEvaluation phi(data, true); - FEFaceEvaluation phi_outer(data, - false); + FEFaceEvaluation phi(data, true); + FEFaceEvaluation phi_outer(data, false); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int face = face_range.first; face < face_range.second; face++) { phi.reinit(face); phi_outer.reinit(face); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; VectorizedArray sigmaF = (std::abs( (phi.get_normal_vector(0) * phi.inverse_jacobian(0))[dim - 1]) + @@ -419,13 +417,14 @@ private: const unsigned int &, const std::pair &face_range) const { - FEFaceEvaluation phi(data); + FEFaceEvaluation phi(data); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int face = face_range.first; face < face_range.second; face++) { phi.reinit(face); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; VectorizedArray sigmaF = std::abs( (phi.get_normal_vector(0) * phi.inverse_jacobian(0))[dim - 1]) * @@ -460,6 +459,7 @@ private: MatrixFree data; LinearAlgebra::distributed::Vector inverse_diagonal_entries; + int fe_degree; }; @@ -526,17 +526,17 @@ private: -template +template void -do_test(const DoFHandler &dof) +do_test(const DoFHandler &dof, const unsigned int n_q_points_1d) { deallog << "Testing " << dof.get_fe().get_name(); deallog << std::endl; deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl; - MappingQ mapping(fe_degree + 1); - LaplaceOperator fine_matrix; - fine_matrix.initialize(mapping, dof); + MappingQ mapping(n_q_points_1d); + LaplaceOperator fine_matrix; + fine_matrix.initialize(mapping, dof, n_q_points_1d); LinearAlgebra::distributed::Vector in, sol; fine_matrix.initialize_dof_vector(in); @@ -545,15 +545,14 @@ do_test(const DoFHandler &dof) in = 1.; // set up multigrid in analogy to step-37 - typedef LaplaceOperator - LevelMatrixType; + typedef LaplaceOperator LevelMatrixType; MGLevelObject mg_matrices; mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1); for (unsigned int level = 0; level < dof.get_triangulation().n_global_levels(); ++level) - mg_matrices[level].initialize(mapping, dof, level); + mg_matrices[level].initialize(mapping, dof, n_q_points_1d, level); MGCoarseIterative mg_coarse; @@ -604,11 +603,11 @@ do_test(const DoFHandler &dof) -template +template void -test() +test(const unsigned int fe_degree) { - for (int i = 5; i < 9 - fe_degree; ++i) + for (unsigned int i = 5; i < 9 - fe_degree; ++i) { parallel::distributed::Triangulation tria( MPI_COMM_WORLD, @@ -636,7 +635,7 @@ test() dof.distribute_dofs(fe); dof.distribute_mg_dofs(); - do_test(dof); + do_test(dof, fe_degree + 1); } } @@ -650,12 +649,12 @@ main(int argc, char **argv) { deallog.push("2d"); - test<2, 1>(); - test<2, 2>(); + test<2>(1); + test<2>(2); deallog.pop(); deallog.push("3d"); - test<3, 1>(); - test<3, 2>(); + test<3>(1); + test<3>(2); deallog.pop(); } } diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index 16b4185219..be14606d6e 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -54,10 +54,7 @@ -template +template class LaplaceOperator : public Subscriptor { public: @@ -68,8 +65,11 @@ public: void initialize(const Mapping & mapping, const DoFHandler &dof_handler, + const unsigned int n_q_points_1d, const unsigned int level = numbers::invalid_unsigned_int) { + fe_degree = dof_handler.get_fe().degree; + const QGauss<1> quad(n_q_points_1d); typename MatrixFree::AdditionalData addit_data; addit_data.tasks_parallel_scheme = @@ -182,7 +182,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const { - FEEvaluation phi(data); + FEEvaluation phi(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { @@ -203,10 +203,8 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); - FEFaceEvaluation fe_eval_neighbor( - data, false); + FEFaceEvaluation fe_eval(data, true); + FEFaceEvaluation fe_eval_neighbor(data, false); for (unsigned int face = face_range.first; face < face_range.second; face++) { @@ -254,8 +252,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); + FEFaceEvaluation fe_eval(data, true); for (unsigned int face = face_range.first; face < face_range.second; face++) { fe_eval.reinit(face); @@ -306,13 +303,14 @@ private: const unsigned int &, const std::pair &cell_range) const { - FEEvaluation phi(data); + FEEvaluation phi(data); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) @@ -324,7 +322,7 @@ private: phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } - for (unsigned int i = 0; i < phi.static_dofs_per_cell; ++i) + for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) phi.begin_dof_values()[i] = local_diagonal_vector[i]; phi.distribute_local_to_global(dst); } @@ -337,16 +335,16 @@ private: const unsigned int &, const std::pair &face_range) const { - FEFaceEvaluation phi(data, true); - FEFaceEvaluation phi_outer(data, - false); + FEFaceEvaluation phi(data, true); + FEFaceEvaluation phi_outer(data, false); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int face = face_range.first; face < face_range.second; face++) { phi.reinit(face); phi_outer.reinit(face); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; VectorizedArray sigmaF = (std::abs( (phi.get_normal_vector(0) * phi.inverse_jacobian(0))[dim - 1]) + @@ -426,13 +424,14 @@ private: const unsigned int &, const std::pair &face_range) const { - FEFaceEvaluation phi(data); + FEFaceEvaluation phi(data); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int face = face_range.first; face < face_range.second; face++) { phi.reinit(face); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; VectorizedArray sigmaF = std::abs( (phi.get_normal_vector(0) * phi.inverse_jacobian(0))[dim - 1]) * @@ -467,6 +466,7 @@ private: MatrixFree data; LinearAlgebra::distributed::Vector inverse_diagonal_entries; + int fe_degree; }; @@ -535,17 +535,17 @@ private: -template +template void -do_test(const DoFHandler &dof, const bool also_test_parallel = false) +do_test(const DoFHandler &dof, const unsigned n_q_points_1d) { deallog << "Testing " << dof.get_fe().get_name(); deallog << std::endl; deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl; - MappingQ mapping(fe_degree + 1); - LaplaceOperator fine_matrix; - fine_matrix.initialize(mapping, dof); + MappingQ mapping(n_q_points_1d); + LaplaceOperator fine_matrix; + fine_matrix.initialize(mapping, dof, n_q_points_1d); LinearAlgebra::distributed::Vector in, sol; fine_matrix.initialize_dof_vector(in); @@ -554,8 +554,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) in = 1.; // set up multigrid in analogy to step-37 - typedef LaplaceOperator - LevelMatrixType; + typedef LaplaceOperator LevelMatrixType; MGLevelObject mg_matrices; mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1); @@ -563,7 +562,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) level < dof.get_triangulation().n_global_levels(); ++level) { - mg_matrices[level].initialize(mapping, dof, level); + mg_matrices[level].initialize(mapping, dof, n_q_points_1d, level); } MGCoarseIterative mg_coarse; @@ -619,11 +618,11 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) -template +template void -test() +test(const unsigned int fe_degree) { - for (int i = 5; i < 9 - fe_degree; ++i) + for (unsigned int i = 5; i < 9 - fe_degree; ++i) { parallel::distributed::Triangulation tria( MPI_COMM_WORLD, @@ -638,7 +637,7 @@ test() dof.distribute_dofs(fe); dof.distribute_mg_dofs(); - do_test(dof, true); + do_test(dof, fe_degree + 1); } } @@ -652,12 +651,12 @@ main(int argc, char **argv) { deallog.push("2d"); - test<2, 1>(); - test<2, 2>(); + test<2>(1); + test<2>(2); deallog.pop(); deallog.push("3d"); - test<3, 1>(); - test<3, 2>(); + test<3>(1); + test<3>(2); deallog.pop(); } } diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index f515e2a59f..ba92487280 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -55,10 +55,7 @@ -template +template class LaplaceOperator : public Subscriptor { public: @@ -69,8 +66,11 @@ public: void initialize(const Mapping & mapping, const DoFHandler &dof_handler, + const unsigned int n_q_points_1d, const unsigned int level = numbers::invalid_unsigned_int) { + fe_degree = dof_handler.get_fe().degree; + const QGauss<1> quad(n_q_points_1d); typename MatrixFree::AdditionalData addit_data; addit_data.tasks_parallel_scheme = @@ -185,7 +185,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair &cell_range) const { - FEEvaluation phi(data); + FEEvaluation phi(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { @@ -206,10 +206,8 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); - FEFaceEvaluation fe_eval_neighbor( - data, false); + FEFaceEvaluation fe_eval(data, true); + FEFaceEvaluation fe_eval_neighbor(data, false); for (unsigned int face = face_range.first; face < face_range.second; face++) { @@ -257,8 +255,7 @@ private: const LinearAlgebra::distributed::Vector &src, const std::pair & face_range) const { - FEFaceEvaluation fe_eval(data, - true); + FEFaceEvaluation fe_eval(data, true); for (unsigned int face = face_range.first; face < face_range.second; face++) { fe_eval.reinit(face); @@ -307,14 +304,15 @@ private: const unsigned int &, const std::pair &cell_range) const { - FEEvaluation phi(data); - FEFaceEvaluation phif(data); + FEEvaluation phi(data); + FEFaceEvaluation phif(data); + AlignedVector> local_diagonal_vector( + phi.dofs_per_cell); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - VectorizedArray local_diagonal_vector[phi.static_dofs_per_cell]; for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) @@ -366,7 +364,7 @@ private: local_diagonal_vector[i] += phif.begin_dof_values()[i]; } } - for (unsigned int i = 0; i < phi.static_dofs_per_cell; ++i) + for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) phi.begin_dof_values()[i] = local_diagonal_vector[i]; phi.distribute_local_to_global(dst); } @@ -374,6 +372,7 @@ private: MatrixFree data; LinearAlgebra::distributed::Vector inverse_diagonal_entries; + int fe_degree; }; @@ -442,17 +441,17 @@ private: -template +template void -do_test(const DoFHandler &dof, const bool also_test_parallel = false) +do_test(const DoFHandler &dof, const unsigned int n_q_points_1d) { deallog << "Testing " << dof.get_fe().get_name(); deallog << std::endl; deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl; - MappingQ mapping(fe_degree + 1); - LaplaceOperator fine_matrix; - fine_matrix.initialize(mapping, dof); + MappingQ mapping(n_q_points_1d); + LaplaceOperator fine_matrix; + fine_matrix.initialize(mapping, dof, n_q_points_1d); LinearAlgebra::distributed::Vector in, sol; fine_matrix.initialize_dof_vector(in); @@ -461,8 +460,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) in = 1.; // set up multigrid in analogy to step-37 - typedef LaplaceOperator - LevelMatrixType; + typedef LaplaceOperator LevelMatrixType; MGLevelObject mg_matrices; mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1); @@ -470,7 +468,7 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) level < dof.get_triangulation().n_global_levels(); ++level) { - mg_matrices[level].initialize(mapping, dof, level); + mg_matrices[level].initialize(mapping, dof, n_q_points_1d, level); } MGCoarseIterative mg_coarse; @@ -526,11 +524,11 @@ do_test(const DoFHandler &dof, const bool also_test_parallel = false) -template +template void -test() +test(const unsigned int fe_degree) { - for (int i = 5; i < 9 - fe_degree; ++i) + for (unsigned int i = 5; i < 9 - fe_degree; ++i) { parallel::distributed::Triangulation tria( MPI_COMM_WORLD, @@ -545,7 +543,7 @@ test() dof.distribute_dofs(fe); dof.distribute_mg_dofs(); - do_test(dof, true); + do_test(dof, fe_degree + 1); } } @@ -560,12 +558,12 @@ main(int argc, char **argv) { deallog.push("2d"); - test<2, 1>(); - test<2, 2>(); + test<2>(1); + test<2>(2); deallog.pop(); deallog.push("3d"); - test<3, 1>(); - test<3, 2>(); + test<3>(1); + test<3>(2); deallog.pop(); } } diff --git a/tests/matrix_free/step-48.cc b/tests/matrix_free/step-48.cc index c86a8be381..82e7096305 100644 --- a/tests/matrix_free/step-48.cc +++ b/tests/matrix_free/step-48.cc @@ -56,7 +56,7 @@ namespace Step48 - template + template class SineGordonOperation { public: @@ -83,8 +83,8 @@ namespace Step48 - template - SineGordonOperation::SineGordonOperation( + template + SineGordonOperation::SineGordonOperation( const MatrixFree &data_in, const double time_step) : data(data_in) @@ -94,8 +94,8 @@ namespace Step48 data.initialize_dof_vector(inv_mass_matrix); - FEEvaluation fe_eval(data); - const unsigned int n_q_points = fe_eval.n_q_points; + FEEvaluation fe_eval(data); + const unsigned int n_q_points = fe_eval.n_q_points; for (unsigned int cell = 0; cell < data.n_macro_cells(); ++cell) { @@ -117,16 +117,16 @@ namespace Step48 - template + template void - SineGordonOperation::local_apply( + SineGordonOperation::local_apply( const MatrixFree & data, LinearAlgebra::distributed::Vector & dst, const std::vector *> &src, const std::pair &cell_range) const { AssertDimension(src.size(), 2); - FEEvaluation current(data), old(data); + FEEvaluation current(data), old(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { current.reinit(cell); @@ -156,17 +156,14 @@ namespace Step48 - template + template void - SineGordonOperation::apply( + SineGordonOperation::apply( LinearAlgebra::distributed::Vector & dst, const std::vector *> &src) const { dst = 0; - data.cell_loop(&SineGordonOperation::local_apply, - this, - dst, - src); + data.cell_loop(&SineGordonOperation::local_apply, this, dst, src); dst.scale(inv_mass_matrix); } @@ -374,8 +371,7 @@ namespace Step48 previous_solutions.push_back(&old_solution); previous_solutions.push_back(&old_old_solution); - SineGordonOperation sine_gordon_op(matrix_free_data, - time_step); + SineGordonOperation sine_gordon_op(matrix_free_data, time_step); unsigned int timestep_number = 1; diff --git a/tests/matrix_free/step-48b.cc b/tests/matrix_free/step-48b.cc index 712ed21a8c..a1fa6965fc 100644 --- a/tests/matrix_free/step-48b.cc +++ b/tests/matrix_free/step-48b.cc @@ -50,7 +50,7 @@ namespace Step48 - template + template class SineGordonOperation { public: @@ -77,8 +77,8 @@ namespace Step48 - template - SineGordonOperation::SineGordonOperation( + template + SineGordonOperation::SineGordonOperation( const MatrixFree &data_in, const double time_step) : data(data_in) @@ -88,8 +88,8 @@ namespace Step48 data.initialize_dof_vector(inv_mass_matrix); - FEEvaluation fe_eval(data); - const unsigned int n_q_points = fe_eval.n_q_points; + FEEvaluation fe_eval(data); + const unsigned int n_q_points = fe_eval.n_q_points; for (unsigned int cell = 0; cell < data.n_macro_cells(); ++cell) { @@ -111,16 +111,16 @@ namespace Step48 - template + template void - SineGordonOperation::local_apply( + SineGordonOperation::local_apply( const MatrixFree & data, LinearAlgebra::distributed::Vector & dst, const std::vector *> &src, const std::pair &cell_range) const { AssertDimension(src.size(), 2); - FEEvaluation current(data), old(data); + FEEvaluation current(data), old(data); deallog << "submit / sine values: "; for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { @@ -164,17 +164,14 @@ namespace Step48 - template + template void - SineGordonOperation::apply( + SineGordonOperation::apply( LinearAlgebra::distributed::Vector & dst, const std::vector *> &src) const { dst = 0; - data.cell_loop(&SineGordonOperation::local_apply, - this, - dst, - src); + data.cell_loop(&SineGordonOperation::local_apply, this, dst, src); dst.scale(inv_mass_matrix); } @@ -335,8 +332,7 @@ namespace Step48 previous_solutions.push_back(&old_solution); previous_solutions.push_back(&old_old_solution); - SineGordonOperation sine_gordon_op(matrix_free_data, - time_step); + SineGordonOperation sine_gordon_op(matrix_free_data, time_step); unsigned int timestep_number = 1; diff --git a/tests/matrix_free/step-48c.cc b/tests/matrix_free/step-48c.cc index c20391700a..8be0462527 100644 --- a/tests/matrix_free/step-48c.cc +++ b/tests/matrix_free/step-48c.cc @@ -56,7 +56,7 @@ namespace Step48 - template + template class SineGordonOperation { public: @@ -83,8 +83,8 @@ namespace Step48 - template - SineGordonOperation::SineGordonOperation( + template + SineGordonOperation::SineGordonOperation( const MatrixFree &data_in, const double time_step) : data(data_in) @@ -94,8 +94,8 @@ namespace Step48 data.initialize_dof_vector(inv_mass_matrix); - FEEvaluation fe_eval(data); - const unsigned int n_q_points = fe_eval.n_q_points; + FEEvaluation fe_eval(data); + const unsigned int n_q_points = fe_eval.n_q_points; for (unsigned int cell = 0; cell < data.n_macro_cells(); ++cell) { @@ -117,16 +117,16 @@ namespace Step48 - template + template void - SineGordonOperation::local_apply( + SineGordonOperation::local_apply( const MatrixFree & data, LinearAlgebra::distributed::Vector & dst, const std::vector *> &src, const std::pair &cell_range) const { AssertDimension(src.size(), 2); - FEEvaluation current(data), old(data); + FEEvaluation current(data), old(data); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { current.reinit(cell); @@ -154,17 +154,14 @@ namespace Step48 - template + template void - SineGordonOperation::apply( + SineGordonOperation::apply( LinearAlgebra::distributed::Vector & dst, const std::vector *> &src) const { dst = 0; - data.cell_loop(&SineGordonOperation::local_apply, - this, - dst, - src); + data.cell_loop(&SineGordonOperation::local_apply, this, dst, src); dst.scale(inv_mass_matrix); } @@ -344,8 +341,7 @@ namespace Step48 previous_solutions.push_back(&old_solution); previous_solutions.push_back(&old_old_solution); - SineGordonOperation sine_gordon_op(matrix_free_data, - time_step); + SineGordonOperation sine_gordon_op(matrix_free_data, time_step); unsigned int timestep_number = 1; -- 2.39.5