From: kronbichler Date: Thu, 27 Feb 2014 10:02:26 +0000 (+0000) Subject: Simplify test code X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18472f10d56469b0957e43d843f2ee65f91e65d5;p=dealii-svn.git Simplify test code git-svn-id: https://svn.dealii.org/trunk@32565 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/matrix_free/thread_correctness_hp.cc b/tests/matrix_free/thread_correctness_hp.cc index 0d9015d9bb..88d85f98e3 100644 --- a/tests/matrix_free/thread_correctness_hp.cc +++ b/tests/matrix_free/thread_correctness_hp.cc @@ -49,35 +49,21 @@ public: { // Ask MatrixFree for cell_range for different // orders - std::pair subrange_deg = - data.create_cell_subrange_hp (cell_range, 1); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 2); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 3); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 4); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 5); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 6); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); - subrange_deg = data.create_cell_subrange_hp (cell_range, 7); - if (subrange_deg.second > subrange_deg.first) - helmholtz_operator > (data, dst, src, - subrange_deg); + std::pair subrange_deg; +#define CALL_METHOD(degree) \ + subrange_deg = data.create_cell_subrange_hp(cell_range, degree); \ + if (subrange_deg.second > subrange_deg.first) \ + helmholtz_operator > (data, dst, src, subrange_deg) + + CALL_METHOD(1); + CALL_METHOD(2); + CALL_METHOD(3); + CALL_METHOD(4); + CALL_METHOD(5); + CALL_METHOD(6); + CALL_METHOD(7); + +#undef CALL_METHOD } void vmult (Vector &dst,