From: Timo Heister Date: Wed, 27 May 2020 21:08:30 +0000 (-0400) Subject: update examples and tests X-Git-Tag: v9.3.0-rc1~1487^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10bb576044e6049d84b68357cd7e9b5dcf5dc5b8;p=dealii.git update examples and tests --- diff --git a/examples/step-37/doc/results.dox b/examples/step-37/doc/results.dox index 1f75e6cb96..1088e37770 100644 --- a/examples/step-37/doc/results.dox +++ b/examples/step-37/doc/results.dox @@ -574,13 +574,13 @@ void LaplaceProblem::assemble_rhs() { phi.reinit(cell); phi.read_dof_values_plain(solution); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { phi.submit_gradient(-coefficient(cell, q) * phi.get_gradient(q), q); phi.submit_value(make_vectorized_array(1.0), q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values|EvaluationFlags::gradients); phi.distribute_local_to_global(system_rhs); } system_rhs.compress(VectorOperation::add); @@ -662,7 +662,7 @@ void LaplaceProblem::assemble_rhs() phi.reinit(cell); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_value(make_vectorized_array(1.0), q); - phi.integrate(true, false); + phi.integrate(EvaluationFlags::values); phi.distribute_local_to_global(system_rhs); } system_rhs.compress(VectorOperation::add); diff --git a/examples/step-37/step-37.cc b/examples/step-37/step-37.cc index 3bbabfad07..7a99630058 100644 --- a/examples/step-37/step-37.cc +++ b/examples/step-37/step-37.cc @@ -630,11 +630,11 @@ namespace Step37 phi.submit_dof_value(VectorizedArray(), j); phi.submit_dof_value(make_vectorized_array(1.), i); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(coefficient(cell, q) * phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); diagonal[i] = phi.get_dof_value(i); } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -911,7 +911,7 @@ namespace Step37 phi.reinit(cell); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_value(make_vectorized_array(1.0), q); - phi.integrate(true, false); + phi.integrate(EvaluationFlags::values); phi.distribute_local_to_global(system_rhs); } system_rhs.compress(VectorOperation::add); diff --git a/examples/step-48/step-48.cc b/examples/step-48/step-48.cc index f228ecd789..1fe2971238 100644 --- a/examples/step-48/step-48.cc +++ b/examples/step-48/step-48.cc @@ -132,7 +132,7 @@ namespace Step48 fe_eval.reinit(cell); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(make_vectorized_array(1.), q); - fe_eval.integrate(true, false); + fe_eval.integrate(); fe_eval.distribute_local_to_global(inv_mass_matrix); } @@ -198,8 +198,8 @@ namespace Step48 current.read_dof_values(*src[0]); old.read_dof_values(*src[1]); - current.evaluate(true, true, false); - old.evaluate(true, false, false); + current.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); + old.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < current.n_q_points; ++q) { @@ -212,7 +212,7 @@ namespace Step48 current.submit_gradient(-delta_t_sqr * current.get_gradient(q), q); } - current.integrate(true, true); + current.integrate(EvaluationFlags::values | EvaluationFlags::gradients); current.distribute_local_to_global(dst); } } diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index c1f78e0d06..8b4f490018 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -951,7 +951,7 @@ void LaplaceProblem::assemble_rhs() { phi.reinit(cell); phi.read_dof_values_plain(solution_copy); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -962,7 +962,9 @@ void LaplaceProblem::assemble_rhs() right_hand_side_function.value(phi.quadrature_point(q)), q); } - phi.integrate_scatter(true, true, right_hand_side_copy); + phi.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + right_hand_side_copy); } right_hand_side_copy.compress(VectorOperation::add); diff --git a/examples/step-59/step-59.cc b/examples/step-59/step-59.cc index 2a14b4b0b7..a541f5fe72 100644 --- a/examples/step-59/step-59.cc +++ b/examples/step-59/step-59.cc @@ -484,10 +484,10 @@ namespace Step59 for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - phi.gather_evaluate(src, false, true); + phi.gather_evaluate(src, EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate_scatter(false, true, dst); + phi.integrate_scatter(EvaluationFlags::gradients, dst); } } @@ -553,9 +553,13 @@ namespace Step59 // gathering values from cells that are farther apart in the index // list of cells. phi_inner.reinit(face); - phi_inner.gather_evaluate(src, true, true); + phi_inner.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); phi_outer.reinit(face); - phi_outer.gather_evaluate(src, true, true); + phi_outer.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); // The next two statements compute the penalty parameter for the // interior penalty method. As explained in the introduction, we would @@ -623,8 +627,12 @@ namespace Step59 // vector using the same pattern as in `gather_evaluate`. Like before, // the combined integrate + write operation allows us to reduce the // data access. - phi_inner.integrate_scatter(true, true, dst); - phi_outer.integrate_scatter(true, true, dst); + phi_inner.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); + phi_outer.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); } } @@ -669,7 +677,9 @@ namespace Step59 for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_inner.reinit(face); - phi_inner.gather_evaluate(src, true, true); + phi_inner.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); const VectorizedArray inverse_length_normal_to_face = std::abs((phi_inner.get_normal_vector(0) * @@ -696,7 +706,9 @@ namespace Step59 phi_inner.submit_normal_derivative(-solution_jump * number(0.5), q); phi_inner.submit_value(test_by_value, q); } - phi_inner.integrate_scatter(true, true, dst); + phi_inner.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); } } @@ -1091,7 +1103,7 @@ namespace Step59 } phi.submit_value(rhs_val, q); } - phi.integrate_scatter(true, false, system_rhs); + phi.integrate_scatter(EvaluationFlags::values, system_rhs); } // Secondly, we also need to apply the Dirichlet and Neumann boundary @@ -1169,7 +1181,9 @@ namespace Step59 q); phi_face.submit_normal_derivative(-0.5 * test_value, q); } - phi_face.integrate_scatter(true, true, system_rhs); + phi_face.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + system_rhs); } // Since we have manually run the loop over cells rather than using diff --git a/examples/step-67/step-67.cc b/examples/step-67/step-67.cc index 835abf0169..fa8ecf7006 100644 --- a/examples/step-67/step-67.cc +++ b/examples/step-67/step-67.cc @@ -1066,7 +1066,7 @@ namespace Euler_DG for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - phi.gather_evaluate(src, true, false); + phi.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -1089,7 +1089,11 @@ namespace Euler_DG } } - phi.integrate_scatter(body_force.get() != nullptr, true, dst); + phi.integrate_scatter(((body_force.get() != nullptr) ? + EvaluationFlags::values : + EvaluationFlags::nothing) | + EvaluationFlags::gradients, + dst); } } @@ -1148,10 +1152,10 @@ namespace Euler_DG for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi_p.reinit(face); - phi_p.gather_evaluate(src, true, false); + phi_p.gather_evaluate(src, EvaluationFlags::values); phi_m.reinit(face); - phi_m.gather_evaluate(src, true, false); + phi_m.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < phi_m.n_q_points; ++q) { @@ -1163,8 +1167,8 @@ namespace Euler_DG phi_p.submit_value(numerical_flux, q); } - phi_p.integrate_scatter(true, false, dst); - phi_m.integrate_scatter(true, false, dst); + phi_p.integrate_scatter(EvaluationFlags::values, dst); + phi_m.integrate_scatter(EvaluationFlags::values, dst); } } @@ -1233,7 +1237,7 @@ namespace Euler_DG for (unsigned int face = face_range.first; face < face_range.second; ++face) { phi.reinit(face); - phi.gather_evaluate(src, true, false); + phi.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -1289,7 +1293,7 @@ namespace Euler_DG phi.submit_value(-flux, q); } - phi.integrate_scatter(true, false, dst); + phi.integrate_scatter(EvaluationFlags::values, dst); } } @@ -1621,7 +1625,7 @@ namespace Euler_DG for (unsigned int cell = 0; cell < data.n_cell_batches(); ++cell) { phi.reinit(cell); - phi.gather_evaluate(solution, true, false); + phi.gather_evaluate(solution, EvaluationFlags::values); VectorizedArray local_errors_squared[3] = {}; for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -1703,7 +1707,7 @@ namespace Euler_DG for (unsigned int cell = 0; cell < data.n_cell_batches(); ++cell) { phi.reinit(cell); - phi.gather_evaluate(solution, true, false); + phi.gather_evaluate(solution, EvaluationFlags::values); VectorizedArray local_max = 0.; for (unsigned int q = 0; q < phi.n_q_points; ++q) { diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 28f7561ba9..bea7aa9949 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -436,7 +436,7 @@ public: /** * Return the value of a finite element function at quadrature point number - * @p q_point after a call to @p evaluate(true,...), or the value that has + * @p q_point after a call to @p evaluate() with EvaluationFlags::value set, or the value that has * been stored there with a call to @p submit_value. If the object is * vector-valued, a vector-valued return argument is given. Note that when * vectorization is enabled, values from several cells are grouped together. @@ -451,7 +451,7 @@ public: /** * Write a value to the field containing the values on quadrature points * with component @p q_point. Access to the same field as through @p - * get_value. If applied before the function @p integrate(true,...) is + * get_value. If applied before the function @p integrate() with EvaluationFlags::values set is * called, this specifies the value which is tested by all basis function on * the current cell and integrated over. * @@ -464,7 +464,7 @@ public: /** * Return the gradient of a finite element function at quadrature point - * number @p q_point after a call to @p evaluate(...,true,...), or the value + * number @p q_point after a call to @p evaluate() with EvaluationFlags::gradients, or the value * that has been stored there with a call to @p submit_gradient. * * Note that the derived class FEEvaluationAccess overloads this operation @@ -1835,8 +1835,8 @@ protected: * { * phi.reinit(cell_index); * phi.read_dof_values(vector); - * phi.evaluate(true, false); // interpolate values, but not gradients - * for (unsigned int q_index=0; q_index val = phi.get_value(q_index); * // do something with val @@ -1885,7 +1885,7 @@ protected: * } * phi.submit_value(f_value, q); * } - * phi.integrate(true, false); + * phi.integrate(EvaluationFlags::values); * phi.distribute_local_to_global(dst); * } * @endcode @@ -1984,13 +1984,13 @@ protected: * * // Apply operator on unit vector to generate the next few matrix * // columns - * fe_eval.evaluate(true, true); + * fe_eval.evaluate(EvaluationFlags::values|EvaluationFlags::gradients); * for (unsigned int q=0; q val1 = phi1.get_value(q); diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 83da1f728b..4b9f4c79f1 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -728,12 +728,13 @@ public: /** * The loop does only involve FEFaceEvaluation access into neighbors by - * function values, such as `FEFaceEvaluation::gather_evaluate(src, true, - * false)`, but no access to shape function derivatives (which typically - * need to access more data). For FiniteElement types where only some of - * the shape functions have support on a face, such as an FE_DGQ element - * with Lagrange polynomials with nodes on the element surface, the data - * exchange is reduced from `(k+1)^dim` to `(k+1)^(dim-1)`. + * function values, such as `FEFaceEvaluation::gather_evaluate() with + * argument EvaluationFlags::values, but no access to shape function + * derivatives (which typically need to access more data). For FiniteElement + * types where only some of the shape functions have support on a face, such + * as an FE_DGQ element with Lagrange polynomials with nodes on the element + * surface, the data exchange is reduced from `(k+1)^dim` to + * `(k+1)^(dim-1)`. */ values, @@ -750,12 +751,12 @@ public: /** * The loop does involve FEFaceEvaluation access into neighbors by * function values and gradients, but no second derivatives, such as - * `FEFaceEvaluation::gather_evaluate(src, true, true)`. For - * FiniteElement types where only some of the shape functions have - * non-zero value and first derivative on a face, such as an FE_DGQHermite - * element, the data exchange is reduced, e.g. from `(k+1)^dim` to - * `2(k+1)^(dim-1)`. Note that for bases that do not have this special - * property, the full neighboring data is sent anyway. + * FEFaceEvaluation::gather_evaluate() with EvaluationFlags::values and + * EvaluationFlags::gradients set. For FiniteElement types where only some + * of the shape functions have non-zero value and first derivative on a + * face, such as an FE_DGQHermite element, the data exchange is reduced, + * e.g. from `(k+1)^dim` to `2(k+1)^(dim-1)`. Note that for bases that do + * not have this special property, the full neighboring data is sent anyway. */ gradients, diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 46a58e4c01..79cffcf445 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -684,7 +684,7 @@ namespace MatrixFreeOperators * @code * for (unsigned int q=0; q::value_type> &phi, const unsigned int cell) const { - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); if (scalar_coefficient.get()) { Assert(scalar_coefficient->size(1) == 1 || @@ -2111,7 +2111,7 @@ namespace MatrixFreeOperators phi.submit_gradient(phi.get_gradient(q), q); } } - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); } diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index 0153509932..b08b3d9546 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -230,11 +230,11 @@ namespace VectorTools { phi.reinit(cell); phi.read_dof_values_plain(inhomogeneities); - phi.evaluate(true, false); + phi.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_value(phi.get_value(q), q); - phi.integrate(true, false); + phi.integrate(EvaluationFlags::values); phi.distribute_local_to_global(rhs); } rhs.compress(VectorOperation::add); @@ -758,7 +758,7 @@ namespace VectorTools for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(func(cell, q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(rhs); } rhs.compress(VectorOperation::add); diff --git a/tests/lac/utilities_02.cc b/tests/lac/utilities_02.cc index 324c881df3..bfebaf4764 100644 --- a/tests/lac/utilities_02.cc +++ b/tests/lac/utilities_02.cc @@ -147,7 +147,7 @@ test() fe_eval.reinit(cell); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(one, q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(inv_mass_matrix); } inv_mass_matrix.compress(VectorOperation::add); diff --git a/tests/matrix_free/advect_1d.cc b/tests/matrix_free/advect_1d.cc index 07bb703ee8..929d10685f 100644 --- a/tests/matrix_free/advect_1d.cc +++ b/tests/matrix_free/advect_1d.cc @@ -112,10 +112,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(true, false); + phi.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(advection * phi.get_value(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -141,10 +141,10 @@ private: { phi_m.reinit(face); phi_m.read_dof_values(src); - phi_m.evaluate(true, false); + phi_m.evaluate(EvaluationFlags::values); phi_p.reinit(face); phi_p.read_dof_values(src); - phi_p.evaluate(true, false); + phi_p.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi_m.n_q_points; ++q) { @@ -160,9 +160,9 @@ private: phi_p.submit_value(flux_times_normal, q); } - phi_m.integrate(true, false); + phi_m.integrate(EvaluationFlags::values); phi_m.distribute_local_to_global(dst); - phi_p.integrate(true, false); + phi_p.integrate(EvaluationFlags::values); phi_p.distribute_local_to_global(dst); } } @@ -186,7 +186,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { @@ -201,7 +201,7 @@ private: fe_eval.submit_value(-flux_times_normal, q); } - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/advect_1d_system.cc b/tests/matrix_free/advect_1d_system.cc index 809dfd9925..4db30ed364 100644 --- a/tests/matrix_free/advect_1d_system.cc +++ b/tests/matrix_free/advect_1d_system.cc @@ -112,7 +112,7 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(true, false); + phi.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) { Tensor<1, n_components, Tensor<1, dim, VectorizedArray>> @@ -122,7 +122,7 @@ private: grad[c][d] = advection[d] * phi.get_value(q)[c]; phi.submit_gradient(grad, q); } - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -148,10 +148,10 @@ private: { phi_m.reinit(face); phi_m.read_dof_values(src); - phi_m.evaluate(true, false); + phi_m.evaluate(EvaluationFlags::values); phi_p.reinit(face); phi_p.read_dof_values(src); - phi_p.evaluate(true, false); + phi_p.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi_m.n_q_points; ++q) { @@ -167,9 +167,9 @@ private: phi_p.submit_value(flux_times_normal, q); } - phi_m.integrate(true, false); + phi_m.integrate(EvaluationFlags::values); phi_m.distribute_local_to_global(dst); - phi_p.integrate(true, false); + phi_p.integrate(EvaluationFlags::values); phi_p.distribute_local_to_global(dst); } } @@ -193,7 +193,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { @@ -208,7 +208,7 @@ private: fe_eval.submit_value(-flux_times_normal, q); } - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/advect_1d_vectorization_mask.cc b/tests/matrix_free/advect_1d_vectorization_mask.cc index db081f114a..230b332308 100644 --- a/tests/matrix_free/advect_1d_vectorization_mask.cc +++ b/tests/matrix_free/advect_1d_vectorization_mask.cc @@ -113,10 +113,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(true, false); + phi.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(advection * phi.get_value(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); for (unsigned int v = 0; v < n_vect; ++v) { std::bitset mask; @@ -149,10 +149,10 @@ private: { phi_m.reinit(face); phi_m.read_dof_values(src); - phi_m.evaluate(true, false); + phi_m.evaluate(EvaluationFlags::values); phi_p.reinit(face); phi_p.read_dof_values(src); - phi_p.evaluate(true, false); + phi_p.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < phi_m.n_q_points; ++q) { @@ -168,14 +168,14 @@ private: phi_p.submit_value(flux_times_normal, q); } - phi_m.integrate(true, false); + phi_m.integrate(EvaluationFlags::values); for (unsigned int v = 0; v < n_vect; ++v) { std::bitset mask; mask[v] = true; phi_m.distribute_local_to_global(dst, 0, mask); } - phi_p.integrate(true, false); + phi_p.integrate(EvaluationFlags::values); for (unsigned int v = 0; v < n_vect; ++v) { std::bitset mask; @@ -206,7 +206,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { @@ -221,7 +221,7 @@ private: fe_eval.submit_value(-flux_times_normal, q); } - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); for (unsigned int v = 0; v < n_vect; ++v) { std::bitset mask = diff --git a/tests/matrix_free/assemble_matrix_01.cc b/tests/matrix_free/assemble_matrix_01.cc index 10844eadc8..ed988e4278 100644 --- a/tests/matrix_free/assemble_matrix_01.cc +++ b/tests/matrix_free/assemble_matrix_01.cc @@ -100,13 +100,15 @@ do_test(const DoFHandler &dof) for (unsigned int v = 0; v < n_items; ++v) fe_eval.begin_dof_values()[i + v][v] = 1.; - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(10. * fe_eval.get_value(q), q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int v = 0; v < n_items; ++v) for (unsigned int j = 0; j < dofs_per_cell; ++j) diff --git a/tests/matrix_free/assemble_matrix_02.cc b/tests/matrix_free/assemble_matrix_02.cc index 8ccd637d8d..9ae31982f8 100644 --- a/tests/matrix_free/assemble_matrix_02.cc +++ b/tests/matrix_free/assemble_matrix_02.cc @@ -123,7 +123,7 @@ do_test(const DoFHandler &dof) for (unsigned int v = 0; v < n_items; ++v) phi_u.begin_dof_values()[i + v][v] = 1.; - phi_u.evaluate(false, true); + phi_u.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { VectorizedArray div_u = phi_u.get_divergence(q); @@ -131,8 +131,8 @@ do_test(const DoFHandler &dof) q); phi_p.submit_value(-div_u, q); } - phi_u.integrate(false, true); - phi_p.integrate(true, false); + phi_u.integrate(EvaluationFlags::gradients); + phi_p.integrate(EvaluationFlags::values); for (unsigned int v = 0; v < n_items; ++v) { @@ -159,12 +159,12 @@ do_test(const DoFHandler &dof) for (unsigned int v = 0; v < n_items; ++v) phi_p.begin_dof_values()[i + v][v] = 1.; - phi_p.evaluate(true, false); + phi_p.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) { phi_u.submit_divergence(-phi_p.get_value(q), q); } - phi_u.integrate(false, true); + phi_u.integrate(EvaluationFlags::gradients); for (unsigned int v = 0; v < n_items; ++v) for (unsigned int j = 0; j < dofs_per_cell_u; ++j) diff --git a/tests/matrix_free/assemble_matrix_03.cc b/tests/matrix_free/assemble_matrix_03.cc index 6522b8834d..3d772dcf6a 100644 --- a/tests/matrix_free/assemble_matrix_03.cc +++ b/tests/matrix_free/assemble_matrix_03.cc @@ -121,13 +121,13 @@ assemble_on_cell(const typename DoFHandler::active_cell_iterator &cell, for (unsigned int v = 0; v < n_items; ++v) fe_eval.begin_dof_values()[i + v][v] = 1.; - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(10. * fe_eval.get_value(q), q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int v = 0; v < n_items; ++v) for (unsigned int j = 0; j < dofs_per_cell; ++j) diff --git a/tests/matrix_free/compare_faces_by_cells.cc b/tests/matrix_free/compare_faces_by_cells.cc index c4110a8f65..5e73b207a6 100644 --- a/tests/matrix_free/compare_faces_by_cells.cc +++ b/tests/matrix_free/compare_faces_by_cells.cc @@ -149,13 +149,14 @@ private: // Compute phi part for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -169,7 +170,7 @@ private: phi.submit_normal_derivative(-average_value, q); phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -182,13 +183,14 @@ private: (number)(std::max(fe_degree, 1) * (fe_degree + 1.0)) * 2.0; for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); phi_outer.begin_dof_values()[i] = 1.; - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -202,7 +204,8 @@ private: phi_outer.submit_normal_derivative(-average_value, q); phi_outer.submit_value(-average_valgrad, q); } - phi_outer.integrate(true, true); + phi_outer.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); local_diagonal_vector[i] = phi_outer.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -235,7 +238,7 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -246,7 +249,7 @@ private: phi.submit_normal_derivative(-average_value, q); phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -293,7 +296,8 @@ private: for (unsigned int j = 0; j < phif.dofs_per_cell; ++j) phif.begin_dof_values()[j] = VectorizedArray(); phif.begin_dof_values()[i] = 1.; - phif.evaluate(true, true); + phif.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phif.n_q_points; ++q) { VectorizedArray average_value = @@ -305,7 +309,8 @@ private: phif.submit_normal_derivative(-average_value, q); phif.submit_value(average_valgrad, q); } - phif.integrate(true, true); + phif.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); local_diagonal_vector[i] += phif.begin_dof_values()[i]; } } diff --git a/tests/matrix_free/copy_feevaluation.cc b/tests/matrix_free/copy_feevaluation.cc index cf0632a1c3..801a2abb52 100644 --- a/tests/matrix_free/copy_feevaluation.cc +++ b/tests/matrix_free/copy_feevaluation.cc @@ -84,10 +84,10 @@ public: { velocity[0].reinit(cell); velocity[0].read_dof_values(src.block(0)); - velocity[0].evaluate(false, true, false); + velocity[0].evaluate(EvaluationFlags::gradients); pressure2.reinit(cell); pressure2.read_dof_values(src.block(1)); - pressure2.evaluate(true, false, false); + pressure2.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity[0].n_q_points; ++q) { @@ -104,9 +104,9 @@ public: velocity[0].submit_symmetric_gradient(sym_grad_u, q); } - velocity[0].integrate(false, true); + velocity[0].integrate(EvaluationFlags::gradients); velocity[0].distribute_local_to_global(dst.block(0)); - pressure2.integrate(true, false); + pressure2.integrate(EvaluationFlags::values); pressure2.distribute_local_to_global(dst.block(1)); } } diff --git a/tests/matrix_free/estimate_condition_number_mass.cc b/tests/matrix_free/estimate_condition_number_mass.cc index ccc321639b..07d33b9689 100644 --- a/tests/matrix_free/estimate_condition_number_mass.cc +++ b/tests/matrix_free/estimate_condition_number_mass.cc @@ -59,12 +59,12 @@ mass_operator(const MatrixFree & data, { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(fe_eval.get_value(q), q); } - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/faces_value_optimization.cc b/tests/matrix_free/faces_value_optimization.cc index c38f4dc9c3..d495d287fe 100644 --- a/tests/matrix_free/faces_value_optimization.cc +++ b/tests/matrix_free/faces_value_optimization.cc @@ -81,8 +81,8 @@ private: check.reinit(face); ref.read_dof_values(src); - ref.evaluate(true, false); - check.gather_evaluate(src, true, false); + ref.evaluate(EvaluationFlags::values); + check.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < ref.n_q_points; ++q) { @@ -129,8 +129,8 @@ private: checkr.reinit(face); refr.read_dof_values(src); - refr.evaluate(true, false); - checkr.gather_evaluate(src, true, false); + refr.evaluate(EvaluationFlags::values); + checkr.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < ref.n_q_points; ++q) { diff --git a/tests/matrix_free/faces_value_optimization_02.cc b/tests/matrix_free/faces_value_optimization_02.cc index c9b2ff0712..5dcb0ff071 100644 --- a/tests/matrix_free/faces_value_optimization_02.cc +++ b/tests/matrix_free/faces_value_optimization_02.cc @@ -81,8 +81,8 @@ private: check.reinit(face); ref.read_dof_values(src); - ref.evaluate(true, false); - check.gather_evaluate(src, true, false); + ref.evaluate(EvaluationFlags::values); + check.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < ref.n_q_points; ++q) { @@ -129,8 +129,8 @@ private: checkr.reinit(face); refr.read_dof_values(src); - refr.evaluate(true, false); - checkr.gather_evaluate(src, true, false); + refr.evaluate(EvaluationFlags::values); + checkr.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < ref.n_q_points; ++q) { diff --git a/tests/matrix_free/get_functions_common.h b/tests/matrix_free/get_functions_common.h index 33359195d3..1fb0a47ece 100644 --- a/tests/matrix_free/get_functions_common.h +++ b/tests/matrix_free/get_functions_common.h @@ -96,7 +96,8 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // compare values with the ones the FEValues // gives us. Those are seen as reference diff --git a/tests/matrix_free/get_functions_faces.cc b/tests/matrix_free/get_functions_faces.cc index 41833a9e71..ec0158d85d 100644 --- a/tests/matrix_free/get_functions_faces.cc +++ b/tests/matrix_free/get_functions_faces.cc @@ -74,7 +74,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); // Only one vectorization component is filled in this case because we // only have one cell (otherwise the output will not be stable among diff --git a/tests/matrix_free/get_functions_multife.cc b/tests/matrix_free/get_functions_multife.cc index 351169f936..cb1432826a 100644 --- a/tests/matrix_free/get_functions_multife.cc +++ b/tests/matrix_free/get_functions_multife.cc @@ -83,11 +83,13 @@ public: { fe_eval0.reinit(cell); fe_eval0.read_dof_values(src[0]); - fe_eval0.evaluate(true, true, true); + fe_eval0.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); fe_eval1.reinit(cell); fe_eval1.read_dof_values(src[1]); - fe_eval1.evaluate(true, true, true); + fe_eval1.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // compare values with the ones the FEValues // gives us. Those are seen as reference diff --git a/tests/matrix_free/get_functions_multife2.cc b/tests/matrix_free/get_functions_multife2.cc index 4fb6842976..c5e3851956 100644 --- a/tests/matrix_free/get_functions_multife2.cc +++ b/tests/matrix_free/get_functions_multife2.cc @@ -92,15 +92,18 @@ public: { fe_eval0.reinit(cell); fe_eval0.read_dof_values(src[0]); - fe_eval0.evaluate(true, true, true); + fe_eval0.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); fe_eval1.reinit(cell); fe_eval1.read_dof_values(src[1]); - fe_eval1.evaluate(true, true, true); + fe_eval1.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); fe_eval2.reinit(cell); fe_eval2.read_dof_values(src[2]); - fe_eval2.evaluate(true, true, true); + fe_eval2.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // compare values with the ones the FEValues // gives us. Those are seen as reference diff --git a/tests/matrix_free/get_functions_variants.cc b/tests/matrix_free/get_functions_variants.cc index 7266d33413..2d24772755 100644 --- a/tests/matrix_free/get_functions_variants.cc +++ b/tests/matrix_free/get_functions_variants.cc @@ -104,27 +104,28 @@ operator()(const MatrixFree &data, { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // only for values (additional test) fe_eval2.reinit(cell); fe_eval2.read_dof_values(src); - fe_eval2.evaluate(true, false, false); + fe_eval2.evaluate(EvaluationFlags::values); // only gradients fe_eval3.reinit(cell); fe_eval3.read_dof_values(src); - fe_eval3.evaluate(false, true, false); + fe_eval3.evaluate(EvaluationFlags::gradients); // only values and gradients fe_eval4.reinit(cell); fe_eval4.read_dof_values(src); - fe_eval4.evaluate(true, true, false); + fe_eval4.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); // only laplacians fe_eval5.reinit(cell); fe_eval5.read_dof_values(src); - fe_eval5.evaluate(false, false, true); + fe_eval5.evaluate(EvaluationFlags::hessians); // compare values with the values that we get diff --git a/tests/matrix_free/get_functions_variants_gl.cc b/tests/matrix_free/get_functions_variants_gl.cc index aaae3e46da..89919d5ea8 100644 --- a/tests/matrix_free/get_functions_variants_gl.cc +++ b/tests/matrix_free/get_functions_variants_gl.cc @@ -100,27 +100,28 @@ operator()(const MatrixFree &data, { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // only for values (additional test) fe_eval2.reinit(cell); fe_eval2.read_dof_values(src); - fe_eval2.evaluate(true, false, false); + fe_eval2.evaluate(EvaluationFlags::values); // only gradients fe_eval3.reinit(cell); fe_eval3.read_dof_values(src); - fe_eval3.evaluate(false, true, false); + fe_eval3.evaluate(EvaluationFlags::gradients); // only values and gradients fe_eval4.reinit(cell); fe_eval4.read_dof_values(src); - fe_eval4.evaluate(true, true, false); + fe_eval4.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); // only laplacians fe_eval5.reinit(cell); fe_eval5.read_dof_values(src); - fe_eval5.evaluate(false, false, true); + fe_eval5.evaluate(EvaluationFlags::hessians); // compare values with the values that we get diff --git a/tests/matrix_free/integrate_functions.cc b/tests/matrix_free/integrate_functions.cc index 18edaf0a59..4f5f3d0403 100644 --- a/tests/matrix_free/integrate_functions.cc +++ b/tests/matrix_free/integrate_functions.cc @@ -140,7 +140,7 @@ operator()(const MatrixFree &data, submit[d] = gradients[q * dim + d]; fe_eval.submit_gradient(submit, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(*dst[0]); } } diff --git a/tests/matrix_free/integrate_functions_multife.cc b/tests/matrix_free/integrate_functions_multife.cc index 205f488fb4..e65ae60de0 100644 --- a/tests/matrix_free/integrate_functions_multife.cc +++ b/tests/matrix_free/integrate_functions_multife.cc @@ -203,7 +203,7 @@ operator()(const MatrixFree &data, submit[d] = gradients0[q * dim + d]; fe_eval0.submit_gradient(submit, q); } - fe_eval0.integrate(true, true); + fe_eval0.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval0.distribute_local_to_global(dst[0]); // FE 1, Quad 1 @@ -215,7 +215,7 @@ operator()(const MatrixFree &data, submit[d] = gradients1[q * dim + d]; fe_eval1.submit_gradient(submit, q); } - fe_eval1.integrate(true, true); + fe_eval1.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval1.distribute_local_to_global(dst[2]); // FE 0, Quad 1 @@ -227,7 +227,7 @@ operator()(const MatrixFree &data, submit[d] = gradients1[q * dim + d]; fe_eval01.submit_gradient(submit, q); } - fe_eval01.integrate(true, true); + fe_eval01.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval01.distribute_local_to_global(dst[4]); } } diff --git a/tests/matrix_free/integrate_functions_multife2.cc b/tests/matrix_free/integrate_functions_multife2.cc index f8da4af1f3..e98c2a0809 100644 --- a/tests/matrix_free/integrate_functions_multife2.cc +++ b/tests/matrix_free/integrate_functions_multife2.cc @@ -204,7 +204,7 @@ operator()(const MatrixFree &data, submit[d] = gradients0[q * dim + d]; fe_eval0.submit_gradient(submit, q); } - fe_eval0.integrate(true, true); + fe_eval0.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval0.distribute_local_to_global(dst[0]); // FE 1, Quad 1 @@ -216,7 +216,7 @@ operator()(const MatrixFree &data, submit[d] = gradients1[q * dim + d]; fe_eval1.submit_gradient(submit, q); } - fe_eval1.integrate(true, true); + fe_eval1.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval1.distribute_local_to_global(dst[2]); // FE 0, Quad 1 @@ -228,7 +228,7 @@ operator()(const MatrixFree &data, submit[d] = gradients1[q * dim + d]; fe_eval01.submit_gradient(submit, q); } - fe_eval01.integrate(true, true); + fe_eval01.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval01.distribute_local_to_global(dst[4]); } } diff --git a/tests/matrix_free/interpolate_functions_common.h b/tests/matrix_free/interpolate_functions_common.h index 8d46de2e72..f3a08b3e88 100644 --- a/tests/matrix_free/interpolate_functions_common.h +++ b/tests/matrix_free/interpolate_functions_common.h @@ -86,7 +86,8 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); for (unsigned int j = 0; j < data.n_components_filled(cell); ++j) for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) @@ -125,10 +126,10 @@ public: { fe_evalm.reinit(face); fe_evalm.read_dof_values(src); - fe_evalm.evaluate(true, true); + fe_evalm.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_evalp.reinit(face); fe_evalp.read_dof_values(src); - fe_evalp.evaluate(true, true); + fe_evalp.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int j = 0; j < VectorizedArray::size(); ++j) { @@ -191,7 +192,7 @@ public: { fe_evalm.reinit(face); fe_evalm.read_dof_values(src); - fe_evalm.evaluate(true, true); + fe_evalm.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int j = 0; j < VectorizedArray::size(); ++j) { diff --git a/tests/matrix_free/inverse_mass_01.cc b/tests/matrix_free/inverse_mass_01.cc index 4ec033a4bc..ce5adc9f24 100644 --- a/tests/matrix_free/inverse_mass_01.cc +++ b/tests/matrix_free/inverse_mass_01.cc @@ -65,10 +65,10 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(fe_eval.get_value(q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/inverse_mass_02.cc b/tests/matrix_free/inverse_mass_02.cc index fb3bcad473..976bcab72a 100644 --- a/tests/matrix_free/inverse_mass_02.cc +++ b/tests/matrix_free/inverse_mass_02.cc @@ -65,10 +65,10 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(fe_eval.get_value(q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/inverse_mass_03.cc b/tests/matrix_free/inverse_mass_03.cc index 132ce81899..3942df5e5a 100644 --- a/tests/matrix_free/inverse_mass_03.cc +++ b/tests/matrix_free/inverse_mass_03.cc @@ -66,7 +66,7 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) { Tensor<1, 3, VectorizedArray> val = fe_eval.get_value(q); @@ -75,7 +75,7 @@ public: val[2] *= make_vectorized_array(1.98); fe_eval.submit_value(val, q); } - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/inverse_mass_05.cc b/tests/matrix_free/inverse_mass_05.cc index 3f71e84f31..11bd02b51d 100644 --- a/tests/matrix_free/inverse_mass_05.cc +++ b/tests/matrix_free/inverse_mass_05.cc @@ -66,10 +66,10 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(fe_eval.get_value(q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/inverse_mass_06.cc b/tests/matrix_free/inverse_mass_06.cc index ee31aeafdd..edc2a97140 100644 --- a/tests/matrix_free/inverse_mass_06.cc +++ b/tests/matrix_free/inverse_mass_06.cc @@ -65,10 +65,10 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(fe_eval.get_value(q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.set_dof_values(dst); } } diff --git a/tests/matrix_free/inverse_mass_07.cc b/tests/matrix_free/inverse_mass_07.cc index 27243c0c9b..0e2c72ff32 100644 --- a/tests/matrix_free/inverse_mass_07.cc +++ b/tests/matrix_free/inverse_mass_07.cc @@ -66,10 +66,10 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, false); + fe_eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(fe_eval.get_value(q), q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.set_dof_values(dst); } } diff --git a/tests/matrix_free/loop_boundary.cc b/tests/matrix_free/loop_boundary.cc index a06429f196..4d0b79f402 100644 --- a/tests/matrix_free/loop_boundary.cc +++ b/tests/matrix_free/loop_boundary.cc @@ -83,13 +83,15 @@ do_test(const unsigned int n_refine, const bool overlap_communication) for (unsigned int cell = range.first; cell < range.second; ++cell) { eval.reinit(cell); - eval.gather_evaluate(in, false, true); + eval.gather_evaluate(in, EvaluationFlags::gradients); for (unsigned int q = 0; q < eval.n_q_points; ++q) { eval.submit_gradient(eval.get_gradient(q), q); eval.submit_value(eval.quadrature_point(q).square(), q); } - eval.integrate_scatter(true, true, out); + eval.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + out); } }; @@ -107,14 +109,14 @@ do_test(const unsigned int n_refine, const bool overlap_communication) for (unsigned int face = range.first; face < range.second; ++face) { eval.reinit(face); - eval.gather_evaluate(in, true, false); + eval.gather_evaluate(in, EvaluationFlags::values); for (unsigned int q = 0; q < eval.n_q_points; ++q) { eval.submit_value(eval.quadrature_point(q).square() - 6. * eval.get_value(q), q); } - eval.integrate_scatter(true, false, out); + eval.integrate_scatter(EvaluationFlags::values, out); } }; diff --git a/tests/matrix_free/loop_boundary_02.cc b/tests/matrix_free/loop_boundary_02.cc index c0c03f2e85..08a6921e98 100644 --- a/tests/matrix_free/loop_boundary_02.cc +++ b/tests/matrix_free/loop_boundary_02.cc @@ -85,13 +85,15 @@ do_test(const unsigned int n_refine) { eval.reinit(cell); eval.read_dof_values_plain(in); - eval.evaluate(false, true); + eval.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < eval.n_q_points; ++q) { eval.submit_gradient(eval.get_gradient(q), q); eval.submit_value(eval.quadrature_point(q).square(), q); } - eval.integrate_scatter(true, true, out); + eval.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + out); } }; @@ -110,14 +112,14 @@ do_test(const unsigned int n_refine) { eval.reinit(face); eval.read_dof_values_plain(in); - eval.evaluate(true, false); + eval.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < eval.n_q_points; ++q) { eval.submit_value(eval.quadrature_point(q).square() - 6. * eval.get_value(q), q); } - eval.integrate_scatter(true, false, out); + eval.integrate_scatter(EvaluationFlags::values, out); } }; diff --git a/tests/matrix_free/matrix_vector_12.cc b/tests/matrix_free/matrix_vector_12.cc index 74c77bc83b..a67a8b3a88 100644 --- a/tests/matrix_free/matrix_vector_12.cc +++ b/tests/matrix_free/matrix_vector_12.cc @@ -63,7 +63,7 @@ helmholtz_operator( fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(Number(10)) * @@ -71,7 +71,7 @@ helmholtz_operator( q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_13.cc b/tests/matrix_free/matrix_vector_13.cc index 2cfdec6e12..52bbdfb85c 100644 --- a/tests/matrix_free/matrix_vector_13.cc +++ b/tests/matrix_free/matrix_vector_13.cc @@ -63,7 +63,7 @@ helmholtz_operator(const MatrixFree & data, fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(Number(10)) * @@ -71,7 +71,7 @@ helmholtz_operator(const MatrixFree & data, q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_15.cc b/tests/matrix_free/matrix_vector_15.cc index 430cb5dc83..1807d00aa7 100644 --- a/tests/matrix_free/matrix_vector_15.cc +++ b/tests/matrix_free/matrix_vector_15.cc @@ -74,13 +74,13 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src_cpy); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { fe_eval.submit_value(Number(10) * fe_eval.get_value(q), q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } constraints.condense(dst); diff --git a/tests/matrix_free/matrix_vector_16.cc b/tests/matrix_free/matrix_vector_16.cc index 82cd8f9fa8..0cb4bae78f 100644 --- a/tests/matrix_free/matrix_vector_16.cc +++ b/tests/matrix_free/matrix_vector_16.cc @@ -74,7 +74,7 @@ public: { fe_eval.reinit(cell); fe_eval.read_dof_values(src_cpy); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(10.) * @@ -82,7 +82,7 @@ public: q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } constraints.condense(dst); diff --git a/tests/matrix_free/matrix_vector_18.cc b/tests/matrix_free/matrix_vector_18.cc index edea1e308c..2ff3bdd921 100644 --- a/tests/matrix_free/matrix_vector_18.cc +++ b/tests/matrix_free/matrix_vector_18.cc @@ -87,7 +87,8 @@ private: { fe_eval.reinit(cell); fe_eval.read_dof_values(in); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(Number(10) * fe_eval.get_value(q), q); @@ -96,7 +97,7 @@ private: (fe_eval.get_hessian(q) * ones), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(out); } } diff --git a/tests/matrix_free/matrix_vector_20.cc b/tests/matrix_free/matrix_vector_20.cc index 8abb641fac..9088fdd9bc 100644 --- a/tests/matrix_free/matrix_vector_20.cc +++ b/tests/matrix_free/matrix_vector_20.cc @@ -68,8 +68,8 @@ helmholtz_operator(const MatrixFree & data, phi0.read_dof_values(src, 0); phi1.read_dof_values(src, 1); - phi0.evaluate(true, true, false); - phi1.evaluate(true, true, false); + phi0.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); + phi1.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { phi0.submit_value(make_vectorized_array(Number(10)) * @@ -81,9 +81,9 @@ helmholtz_operator(const MatrixFree & data, q); phi1.submit_gradient(phi1.get_gradient(q), q); } - phi0.integrate(true, true); + phi0.integrate(EvaluationFlags::values | EvaluationFlags::gradients); phi0.distribute_local_to_global(dst, 0); - phi1.integrate(true, true); + phi1.integrate(EvaluationFlags::values | EvaluationFlags::gradients); phi1.distribute_local_to_global(dst, 1); } } diff --git a/tests/matrix_free/matrix_vector_21.cc b/tests/matrix_free/matrix_vector_21.cc index e8d16df142..d4a054650b 100644 --- a/tests/matrix_free/matrix_vector_21.cc +++ b/tests/matrix_free/matrix_vector_21.cc @@ -65,7 +65,7 @@ helmholtz_operator(const MatrixFree & data, fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(Number(10)) * @@ -73,7 +73,7 @@ helmholtz_operator(const MatrixFree & data, q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_22.cc b/tests/matrix_free/matrix_vector_22.cc index d71c121a74..eff583f7fc 100644 --- a/tests/matrix_free/matrix_vector_22.cc +++ b/tests/matrix_free/matrix_vector_22.cc @@ -64,7 +64,7 @@ helmholtz_operator( fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(Number(10)) * @@ -72,7 +72,7 @@ helmholtz_operator( q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_23.cc b/tests/matrix_free/matrix_vector_23.cc index cfc16160ed..6cf998969a 100644 --- a/tests/matrix_free/matrix_vector_23.cc +++ b/tests/matrix_free/matrix_vector_23.cc @@ -67,9 +67,9 @@ helmholtz_operator( fe_eval2.reinit(cell); fe_eval2.read_dof_values(src); - fe_eval2.evaluate(true, true, false); + fe_eval2.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.read_dof_values(src, 1); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(make_vectorized_array(Number(10)) * @@ -81,10 +81,10 @@ helmholtz_operator( q); fe_eval2.submit_gradient(fe_eval2.get_gradient(q), q); } - fe_eval2.integrate(true, true); + fe_eval2.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval2.distribute_local_to_global(dst); - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst, 1); } } diff --git a/tests/matrix_free/matrix_vector_blocks.cc b/tests/matrix_free/matrix_vector_blocks.cc index aae66e66c8..2ed5668a92 100644 --- a/tests/matrix_free/matrix_vector_blocks.cc +++ b/tests/matrix_free/matrix_vector_blocks.cc @@ -75,13 +75,17 @@ private: phi.reinit(cell); for (unsigned int block = 0; block < src.n_blocks(); ++block) { - phi.gather_evaluate(src.block(block), true, true, false); + phi.gather_evaluate(src.block(block), + EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { phi.submit_value(Number(10) * phi.get_value(q), q); phi.submit_gradient(phi.get_gradient(q), q); } - phi.integrate_scatter(true, true, dst.block(block)); + phi.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst.block(block)); } } } diff --git a/tests/matrix_free/matrix_vector_curl.cc b/tests/matrix_free/matrix_vector_curl.cc index 9d2e5a4b63..9323a28595 100644 --- a/tests/matrix_free/matrix_vector_curl.cc +++ b/tests/matrix_free/matrix_vector_curl.cc @@ -77,12 +77,12 @@ public: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_curl(coeff * phi.get_curl(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_div.cc b/tests/matrix_free/matrix_vector_div.cc index c94890647d..fb8a00ac7c 100644 --- a/tests/matrix_free/matrix_vector_div.cc +++ b/tests/matrix_free/matrix_vector_div.cc @@ -79,12 +79,12 @@ public: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_divergence(coeff * phi.get_divergence(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_faces_common.h b/tests/matrix_free/matrix_vector_faces_common.h index f0bf4a5302..c2bdeccddf 100644 --- a/tests/matrix_free/matrix_vector_faces_common.h +++ b/tests/matrix_free/matrix_vector_faces_common.h @@ -107,10 +107,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -151,9 +151,10 @@ private: fe_eval_neighbor.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval_neighbor.read_dof_values(src); - fe_eval_neighbor.evaluate(true, true); + fe_eval_neighbor.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArrayType sigmaF = (std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) + @@ -178,9 +179,10 @@ private: fe_eval.submit_value(average_valgrad, q); fe_eval_neighbor.submit_value(-average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); - fe_eval_neighbor.integrate(true, true); + fe_eval_neighbor.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); fe_eval_neighbor.distribute_local_to_global(dst); } } @@ -212,7 +214,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); VectorizedArrayType sigmaF = 2.0 * std::abs((fe_eval.get_normal_vector(0) * @@ -228,7 +230,7 @@ private: fe_eval.submit_value(average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } @@ -310,10 +312,10 @@ private: for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - phi.gather_evaluate(src, false, true); + phi.gather_evaluate(src, EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate_scatter(false, true, dst); + phi.integrate_scatter(EvaluationFlags::gradients, dst); } } @@ -352,8 +354,12 @@ private: fe_eval.reinit(face); fe_eval_neighbor.reinit(face); - fe_eval.gather_evaluate(src, true, true); - fe_eval_neighbor.gather_evaluate(src, true, true); + fe_eval.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); + fe_eval_neighbor.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArrayType sigmaF = (std::abs((fe_eval.get_normal_vector(0) * @@ -379,8 +385,12 @@ private: fe_eval.submit_value(average_valgrad, q); fe_eval_neighbor.submit_value(-average_valgrad, q); } - fe_eval.integrate_scatter(true, true, dst); - fe_eval_neighbor.integrate_scatter(true, true, dst); + fe_eval.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); + fe_eval_neighbor.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); } } @@ -409,7 +419,9 @@ private: for (unsigned int face = face_range.first; face < face_range.second; face++) { fe_eval.reinit(face); - fe_eval.gather_evaluate(src, true, true); + fe_eval.gather_evaluate(src, + EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArrayType sigmaF = std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) * @@ -424,7 +436,9 @@ private: fe_eval.submit_value(average_valgrad, q); } - fe_eval.integrate_scatter(true, true, dst); + fe_eval.integrate_scatter(EvaluationFlags::values | + EvaluationFlags::gradients, + dst); } } @@ -534,12 +548,12 @@ private: for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - phi.gather_evaluate(src, true, false); + phi.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(multiply_by_advection(advection, phi.get_value(q)), q); - phi.integrate_scatter(false, true, dst); + phi.integrate_scatter(EvaluationFlags::gradients, dst); } } @@ -575,9 +589,9 @@ private: for (unsigned int face = face_range.first; face < face_range.second; face++) { phi_m.reinit(face); - phi_m.gather_evaluate(src, true, false); + phi_m.gather_evaluate(src, EvaluationFlags::values); phi_p.reinit(face); - phi_p.gather_evaluate(src, true, false); + phi_p.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < phi_m.n_q_points; ++q) { @@ -593,8 +607,8 @@ private: phi_p.submit_value(flux_times_normal, q); } - phi_m.integrate_scatter(true, false, dst); - phi_p.integrate_scatter(true, false, dst); + phi_m.integrate_scatter(EvaluationFlags::values, dst); + phi_p.integrate_scatter(EvaluationFlags::values, dst); } } @@ -625,7 +639,7 @@ private: for (unsigned int face = face_range.first; face < face_range.second; face++) { fe_eval.reinit(face); - fe_eval.gather_evaluate(src, true, false); + fe_eval.gather_evaluate(src, EvaluationFlags::values); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) { @@ -639,7 +653,7 @@ private: fe_eval.submit_value(-flux_times_normal, q); } - fe_eval.integrate_scatter(true, false, dst); + fe_eval.integrate_scatter(EvaluationFlags::values, dst); } } diff --git a/tests/matrix_free/matrix_vector_mf.h b/tests/matrix_free/matrix_vector_mf.h index 9e536efb9a..afc1ebf6bf 100644 --- a/tests/matrix_free/matrix_vector_mf.h +++ b/tests/matrix_free/matrix_vector_mf.h @@ -43,13 +43,13 @@ helmholtz_operator(const MatrixFree &data, { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true, false); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < n_q_points; ++q) { fe_eval.submit_value(Number(10) * fe_eval.get_value(q), q); fe_eval.submit_gradient(fe_eval.get_gradient(q), q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_stokes.cc b/tests/matrix_free/matrix_vector_stokes.cc index 34725d48ea..73ca41dcd7 100644 --- a/tests/matrix_free/matrix_vector_stokes.cc +++ b/tests/matrix_free/matrix_vector_stokes.cc @@ -78,10 +78,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src, 0); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src, dim); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -97,9 +97,9 @@ public: velocity.submit_gradient(grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst, 0); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst, dim); } } diff --git a/tests/matrix_free/matrix_vector_stokes_base.cc b/tests/matrix_free/matrix_vector_stokes_base.cc index 56d5ccf9e0..18253664bc 100644 --- a/tests/matrix_free/matrix_vector_stokes_base.cc +++ b/tests/matrix_free/matrix_vector_stokes_base.cc @@ -71,10 +71,10 @@ protected: { velocity.reinit(cell); velocity.read_dof_values(src.block(0)); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src.block(1)); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -91,9 +91,9 @@ protected: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst.block(0)); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst.block(1)); } } diff --git a/tests/matrix_free/matrix_vector_stokes_flux.cc b/tests/matrix_free/matrix_vector_stokes_flux.cc index 87e92544ba..648a55c0cf 100644 --- a/tests/matrix_free/matrix_vector_stokes_flux.cc +++ b/tests/matrix_free/matrix_vector_stokes_flux.cc @@ -87,10 +87,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values_plain(src); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values_plain(src); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -107,9 +107,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_stokes_noflux.cc b/tests/matrix_free/matrix_vector_stokes_noflux.cc index 00065b0d27..7f4e88da90 100644 --- a/tests/matrix_free/matrix_vector_stokes_noflux.cc +++ b/tests/matrix_free/matrix_vector_stokes_noflux.cc @@ -78,10 +78,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src.block(0)); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src.block(1)); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -98,9 +98,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst.block(0)); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst.block(1)); } } diff --git a/tests/matrix_free/matrix_vector_stokes_notempl.cc b/tests/matrix_free/matrix_vector_stokes_notempl.cc index b5fcd4bc3b..f4f4d226cf 100644 --- a/tests/matrix_free/matrix_vector_stokes_notempl.cc +++ b/tests/matrix_free/matrix_vector_stokes_notempl.cc @@ -74,10 +74,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src.block(0)); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src.block(1)); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -94,9 +94,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst.block(0)); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst.block(1)); } } diff --git a/tests/matrix_free/matrix_vector_stokes_onedof.cc b/tests/matrix_free/matrix_vector_stokes_onedof.cc index 24ac0f609a..53d3d1cf55 100644 --- a/tests/matrix_free/matrix_vector_stokes_onedof.cc +++ b/tests/matrix_free/matrix_vector_stokes_onedof.cc @@ -84,10 +84,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -104,9 +104,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/matrix_vector_stokes_qdg0.cc b/tests/matrix_free/matrix_vector_stokes_qdg0.cc index 23cc04468c..25e877dec7 100644 --- a/tests/matrix_free/matrix_vector_stokes_qdg0.cc +++ b/tests/matrix_free/matrix_vector_stokes_qdg0.cc @@ -79,10 +79,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src, 0); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src, dim); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -99,9 +99,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst, 0); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst, dim); } } diff --git a/tests/matrix_free/matrix_vector_stokes_qdg0b.cc b/tests/matrix_free/matrix_vector_stokes_qdg0b.cc index 74bcfe25ec..5996466cbe 100644 --- a/tests/matrix_free/matrix_vector_stokes_qdg0b.cc +++ b/tests/matrix_free/matrix_vector_stokes_qdg0b.cc @@ -79,10 +79,10 @@ public: { velocity.reinit(cell); velocity.read_dof_values(src, 0); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src, dim); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -99,9 +99,9 @@ public: velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst, 0); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst, dim); } } diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index fddde48ed1..1e2b6732a2 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -179,10 +179,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -205,9 +205,10 @@ private: fe_eval_neighbor.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval_neighbor.read_dof_values(src); - fe_eval_neighbor.evaluate(true, true); + fe_eval_neighbor.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArray sigmaF = (std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) + @@ -229,9 +230,10 @@ private: fe_eval.submit_value(average_valgrad, q); fe_eval_neighbor.submit_value(-average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); - fe_eval_neighbor.integrate(true, true); + fe_eval_neighbor.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); fe_eval_neighbor.distribute_local_to_global(dst); } } @@ -249,7 +251,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); VectorizedArray sigmaF = std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) * @@ -265,7 +267,7 @@ private: fe_eval.submit_value(average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } @@ -309,10 +311,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + 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) @@ -348,13 +350,14 @@ private: // Compute phi part for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -368,7 +371,7 @@ private: phi.submit_normal_derivative(-average_value, q); phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -378,13 +381,14 @@ private: // Compute phi_outer part for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); phi_outer.begin_dof_values()[i] = 1.; - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -398,7 +402,8 @@ private: phi_outer.submit_normal_derivative(-average_value, q); phi_outer.submit_value(-average_valgrad, q); } - phi_outer.integrate(true, true); + phi_outer.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); local_diagonal_vector[i] = phi_outer.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -431,7 +436,7 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -443,7 +448,7 @@ private: phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index e69e1c4f7a..a9bf1af70d 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -188,10 +188,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -214,9 +214,10 @@ private: fe_eval_neighbor.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval_neighbor.read_dof_values(src); - fe_eval_neighbor.evaluate(true, true); + fe_eval_neighbor.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArray sigmaF = (std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) + @@ -238,9 +239,10 @@ private: fe_eval.submit_value(average_valgrad, q); fe_eval_neighbor.submit_value(-average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); - fe_eval_neighbor.integrate(true, true); + fe_eval_neighbor.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); fe_eval_neighbor.distribute_local_to_global(dst); } } @@ -258,7 +260,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); VectorizedArray sigmaF = std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) * @@ -274,7 +276,7 @@ private: fe_eval.submit_value(average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } @@ -316,10 +318,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + 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) @@ -355,13 +357,14 @@ private: // Compute phi part for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -375,7 +378,7 @@ private: phi.submit_normal_derivative(-average_value, q); phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -385,13 +388,14 @@ private: // Compute phi_outer part for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) { for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi_outer.begin_dof_values()[j] = VectorizedArray(); phi_outer.begin_dof_values()[i] = 1.; - phi_outer.evaluate(true, true); + phi_outer.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -405,7 +409,8 @@ private: phi_outer.submit_normal_derivative(-average_value, q); phi_outer.submit_value(-average_valgrad, q); } - phi_outer.integrate(true, true); + phi_outer.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); local_diagonal_vector[i] = phi_outer.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -438,7 +443,7 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(true, true); + phi.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { @@ -450,7 +455,7 @@ private: phi.submit_value(average_valgrad, q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index f024b22496..be085448be 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -191,10 +191,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -217,9 +217,10 @@ private: fe_eval_neighbor.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval_neighbor.read_dof_values(src); - fe_eval_neighbor.evaluate(true, true); + fe_eval_neighbor.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); VectorizedArray sigmaF = (std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) + @@ -241,9 +242,10 @@ private: fe_eval.submit_value(average_valgrad, q); fe_eval_neighbor.submit_value(-average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); - fe_eval_neighbor.integrate(true, true); + fe_eval_neighbor.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); fe_eval_neighbor.distribute_local_to_global(dst); } } @@ -261,7 +263,7 @@ private: { fe_eval.reinit(face); fe_eval.read_dof_values(src); - fe_eval.evaluate(true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); VectorizedArray sigmaF = std::abs((fe_eval.get_normal_vector(0) * fe_eval.inverse_jacobian(0))[dim - 1]) * @@ -277,7 +279,7 @@ private: fe_eval.submit_value(average_valgrad, q); } - fe_eval.integrate(true, true); + fe_eval.integrate(EvaluationFlags::values | EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } @@ -318,10 +320,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (const unsigned int face : GeometryInfo::face_indices()) @@ -346,7 +348,8 @@ private: for (unsigned int j = 0; j < phif.dofs_per_cell; ++j) phif.begin_dof_values()[j] = VectorizedArray(); phif.begin_dof_values()[i] = 1.; - phif.evaluate(true, true); + phif.evaluate(EvaluationFlags::values | + EvaluationFlags::gradients); for (unsigned int q = 0; q < phif.n_q_points; ++q) { VectorizedArray average_value = @@ -358,7 +361,8 @@ private: phif.submit_normal_derivative(-average_value, q); phif.submit_value(average_valgrad, q); } - phif.integrate(true, true); + phif.integrate(EvaluationFlags::values | + EvaluationFlags::gradients); local_diagonal_vector[i] += phif.begin_dof_values()[i]; } } diff --git a/tests/matrix_free/no_index_initialize.cc b/tests/matrix_free/no_index_initialize.cc index 5a9e207d00..777d1f4659 100644 --- a/tests/matrix_free/no_index_initialize.cc +++ b/tests/matrix_free/no_index_initialize.cc @@ -81,7 +81,8 @@ public: else for (unsigned int e = 0; e < fe_eval.dofs_per_cell; ++e) fe_eval.submit_dof_value(make_vectorized_array(1.), e); - fe_eval.evaluate(true, true, true); + fe_eval.evaluate(EvaluationFlags::values | EvaluationFlags::gradients | + EvaluationFlags::hessians); // values should evaluate to one, derivatives to zero for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) diff --git a/tests/matrix_free/parallel_multigrid.cc b/tests/matrix_free/parallel_multigrid.cc index 63efb7f4d2..125c601dbb 100644 --- a/tests/matrix_free/parallel_multigrid.cc +++ b/tests/matrix_free/parallel_multigrid.cc @@ -210,10 +210,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -255,10 +255,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/parallel_multigrid_adaptive_01.cc b/tests/matrix_free/parallel_multigrid_adaptive_01.cc index aea8ab5c04..989d86af05 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_01.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_01.cc @@ -318,10 +318,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -374,10 +374,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/parallel_multigrid_adaptive_03.cc b/tests/matrix_free/parallel_multigrid_adaptive_03.cc index 3e875651df..578fad89ed 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_03.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_03.cc @@ -325,10 +325,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -381,10 +381,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/parallel_multigrid_adaptive_05.cc b/tests/matrix_free/parallel_multigrid_adaptive_05.cc index 64d48204ce..707c0c5f3a 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_05.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_05.cc @@ -322,10 +322,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -378,10 +378,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/parallel_multigrid_adaptive_08.cc b/tests/matrix_free/parallel_multigrid_adaptive_08.cc index c197184bce..156da67e86 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_08.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_08.cc @@ -146,10 +146,10 @@ private: for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); - phi.gather_evaluate(src, false, true); + phi.gather_evaluate(src, EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate_scatter(false, true, dst); + phi.integrate_scatter(EvaluationFlags::gradients, dst); } } diff --git a/tests/matrix_free/parallel_multigrid_fullydistributed.cc b/tests/matrix_free/parallel_multigrid_fullydistributed.cc index 0f7bd71a2c..213d3f7555 100644 --- a/tests/matrix_free/parallel_multigrid_fullydistributed.cc +++ b/tests/matrix_free/parallel_multigrid_fullydistributed.cc @@ -214,10 +214,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -259,10 +259,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/parallel_multigrid_mf.cc b/tests/matrix_free/parallel_multigrid_mf.cc index 0d0a404344..8fd453e8ca 100644 --- a/tests/matrix_free/parallel_multigrid_mf.cc +++ b/tests/matrix_free/parallel_multigrid_mf.cc @@ -210,10 +210,10 @@ private: { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -255,10 +255,10 @@ private: for (unsigned int j = 0; j < phi.dofs_per_cell; ++j) phi.begin_dof_values()[j] = VectorizedArray(); phi.begin_dof_values()[i] = 1.; - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); local_diagonal_vector[i] = phi.begin_dof_values()[i]; } for (unsigned int i = 0; i < phi.tensor_dofs_per_cell; ++i) diff --git a/tests/matrix_free/pre_and_post_loops_05.cc b/tests/matrix_free/pre_and_post_loops_05.cc index ff348f9e96..ec4180b500 100644 --- a/tests/matrix_free/pre_and_post_loops_05.cc +++ b/tests/matrix_free/pre_and_post_loops_05.cc @@ -125,10 +125,10 @@ private: { fe_eval.reinit(cell); fe_eval.read_dof_values(src); - fe_eval.evaluate(false, true); + fe_eval.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < fe_eval.n_q_points; ++q) fe_eval.submit_gradient(fe_eval.get_gradient(q), q); - fe_eval.integrate(false, true); + fe_eval.integrate(EvaluationFlags::gradients); fe_eval.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/step-37-inhomogeneous-1.cc b/tests/matrix_free/step-37-inhomogeneous-1.cc index d5e5f45aaa..cce6aab0ec 100644 --- a/tests/matrix_free/step-37-inhomogeneous-1.cc +++ b/tests/matrix_free/step-37-inhomogeneous-1.cc @@ -243,10 +243,10 @@ namespace Step37 phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(coefficient(cell, q) * phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } @@ -317,11 +317,11 @@ namespace Step37 phi.submit_dof_value(VectorizedArray(), j); phi.submit_dof_value(make_vectorized_array(1.), i); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(coefficient(cell, q) * phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); diagonal[i] = phi.get_dof_value(i); } for (unsigned int i = 0; i < phi.dofs_per_cell; ++i) @@ -495,13 +495,13 @@ namespace Step37 { phi.reinit(cell); phi.read_dof_values_plain(solution); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { phi.submit_gradient(-coefficient(cell, q) * phi.get_gradient(q), q); phi.submit_value(forcing.value(phi.quadrature_point(q)), q); } - phi.integrate(true, true); + phi.integrate(EvaluationFlags::values | EvaluationFlags::gradients); phi.distribute_local_to_global(system_rhs); } system_rhs.compress(VectorOperation::add); diff --git a/tests/matrix_free/step-37.cc b/tests/matrix_free/step-37.cc index 31cc7e42f4..ffbe8b5aa4 100644 --- a/tests/matrix_free/step-37.cc +++ b/tests/matrix_free/step-37.cc @@ -262,12 +262,12 @@ namespace Step37 { phi.reinit(cell); phi.read_dof_values(src); - phi.evaluate(false, true, false); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) phi.submit_gradient(coefficient[cell * phi.n_q_points + q] * phi.get_gradient(q), q); - phi.integrate(false, true); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/step-48.cc b/tests/matrix_free/step-48.cc index 058c69db2b..c86a8be381 100644 --- a/tests/matrix_free/step-48.cc +++ b/tests/matrix_free/step-48.cc @@ -102,7 +102,7 @@ namespace Step48 fe_eval.reinit(cell); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(one, q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(inv_mass_matrix); } @@ -135,8 +135,8 @@ namespace Step48 current.read_dof_values(*src[0]); old.read_dof_values(*src[1]); - current.evaluate(true, true, false); - old.evaluate(true, false, false); + current.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); + old.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < current.n_q_points; ++q) { @@ -149,7 +149,7 @@ namespace Step48 current.submit_gradient(-delta_t_sqr * current.get_gradient(q), q); } - current.integrate(true, true); + current.integrate(EvaluationFlags::values | EvaluationFlags::gradients); current.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/step-48b.cc b/tests/matrix_free/step-48b.cc index 1e9dbd0fb0..712ed21a8c 100644 --- a/tests/matrix_free/step-48b.cc +++ b/tests/matrix_free/step-48b.cc @@ -96,7 +96,7 @@ namespace Step48 fe_eval.reinit(cell); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(one, q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(inv_mass_matrix); } @@ -130,8 +130,8 @@ namespace Step48 current.read_dof_values(*src[0]); old.read_dof_values(*src[1]); - current.evaluate(true, true, false); - old.evaluate(true, false, false); + current.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); + old.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < current.n_q_points; ++q) { @@ -157,7 +157,7 @@ namespace Step48 << sin_value[v] << std::endl; } - current.integrate(true, true); + current.integrate(EvaluationFlags::values | EvaluationFlags::gradients); current.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/step-48c.cc b/tests/matrix_free/step-48c.cc index a471c51213..c20391700a 100644 --- a/tests/matrix_free/step-48c.cc +++ b/tests/matrix_free/step-48c.cc @@ -102,7 +102,7 @@ namespace Step48 fe_eval.reinit(cell); for (unsigned int q = 0; q < n_q_points; ++q) fe_eval.submit_value(one, q); - fe_eval.integrate(true, false); + fe_eval.integrate(EvaluationFlags::values); fe_eval.distribute_local_to_global(inv_mass_matrix); } @@ -135,8 +135,8 @@ namespace Step48 current.read_dof_values(*src[0]); old.read_dof_values(*src[1]); - current.evaluate(true, true, false); - old.evaluate(true, false, false); + current.evaluate(EvaluationFlags::values | EvaluationFlags::gradients); + old.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < current.n_q_points; ++q) { @@ -147,7 +147,7 @@ namespace Step48 current.submit_gradient(-delta_t_sqr * current.get_gradient(q), q); } - current.integrate(true, true); + current.integrate(EvaluationFlags::values | EvaluationFlags::gradients); current.distribute_local_to_global(dst); } } diff --git a/tests/matrix_free/stokes_computation.cc b/tests/matrix_free/stokes_computation.cc index ab1f5b2727..93d381fec2 100644 --- a/tests/matrix_free/stokes_computation.cc +++ b/tests/matrix_free/stokes_computation.cc @@ -514,10 +514,10 @@ namespace StokesClass { velocity.reinit(cell); velocity.read_dof_values(src.block(0)); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); pressure.reinit(cell); pressure.read_dof_values(src.block(1)); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { @@ -535,9 +535,9 @@ namespace StokesClass velocity.submit_symmetric_gradient(sym_grad_u, q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst.block(0)); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst.block(1)); } } @@ -648,12 +648,12 @@ namespace StokesClass pressure.reinit(cell); pressure.read_dof_values(src); - pressure.evaluate(true, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < pressure.n_q_points; ++q) pressure.submit_value(one_over_viscosity(cell, q) * pressure.get_value(q), q); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(dst); } } @@ -721,12 +721,12 @@ namespace StokesClass pressure.begin_dof_values()[j] = VectorizedArray(); pressure.begin_dof_values()[i] = make_vectorized_array(1.); - pressure.evaluate(true, false, false); + pressure.evaluate(EvaluationFlags::values); for (unsigned int q = 0; q < pressure.n_q_points; ++q) pressure.submit_value(one_over_viscosity(cell, q) * pressure.get_value(q), q); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); diagonal[i] = pressure.begin_dof_values()[i]; } @@ -828,13 +828,13 @@ namespace StokesClass velocity.reinit(cell); velocity.read_dof_values(src); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { velocity.submit_symmetric_gradient( viscosity_x_2(cell, q) * velocity.get_symmetric_gradient(q), q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); velocity.distribute_local_to_global(dst); } } @@ -893,14 +893,14 @@ namespace StokesClass velocity.begin_dof_values()[j] = VectorizedArray(); velocity.begin_dof_values()[i] = make_vectorized_array(1.); - velocity.evaluate(false, true, false); + velocity.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < velocity.n_q_points; ++q) { velocity.submit_symmetric_gradient( viscosity_x_2(cell, q) * velocity.get_symmetric_gradient(q), q); } - velocity.integrate(false, true); + velocity.integrate(EvaluationFlags::gradients); diagonal[i] = velocity.begin_dof_values()[i]; } @@ -1237,9 +1237,9 @@ namespace StokesClass velocity.submit_value(rhs_u, q); pressure.submit_value(rhs_p, q); } - velocity.integrate(true, false); + velocity.integrate(EvaluationFlags::values); velocity.distribute_local_to_global(system_rhs.block(0)); - pressure.integrate(true, false); + pressure.integrate(EvaluationFlags::values); pressure.distribute_local_to_global(system_rhs.block(1)); } system_rhs.compress(VectorOperation::add); diff --git a/tests/mpi/step-37.cc b/tests/mpi/step-37.cc index 5d342b5576..82e994820c 100644 --- a/tests/mpi/step-37.cc +++ b/tests/mpi/step-37.cc @@ -356,14 +356,14 @@ namespace Step37 { phi.reinit(cell); phi.read_dof_values_plain(solution); - phi.evaluate(false, true); + phi.evaluate(EvaluationFlags::gradients); for (unsigned int q = 0; q < phi.n_q_points; ++q) { phi.submit_gradient(-phi.get_gradient(q), q); // phi.submit_value(make_vectorized_array(1.0), q); } - // phi.integrate(true, true); - phi.integrate(false, true); + // phi.integrate(EvaluationFlags::values|EvaluationFlags::gradients); + phi.integrate(EvaluationFlags::gradients); phi.distribute_local_to_global(system_rhs); } system_rhs.compress(VectorOperation::add);