From: David Wells Date: Thu, 12 Jul 2018 13:19:08 +0000 (-0400) Subject: step-9: Label terms in the weak form. X-Git-Tag: v9.1.0-rc1~853^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=353c27c4c0d876f87e94adbd3055e9c41a7d3817;p=dealii.git step-9: Label terms in the weak form. --- diff --git a/examples/step-9/step-9.cc b/examples/step-9/step-9.cc index aae5134f95..b5c648a416 100644 --- a/examples/step-9/step-9.cc +++ b/examples/step-9/step-9.cc @@ -643,21 +643,24 @@ namespace Step9 for (unsigned int q_point = 0; q_point < n_q_points; ++q_point) for (unsigned int i = 0; i < dofs_per_cell; ++i) { + // Alias the AssemblyScratchData object to keep the lines from + // getting too long: + const auto &sd = scratch_data; for (unsigned int j = 0; j < dofs_per_cell; ++j) copy_data.cell_matrix(i, j) += - ((scratch_data.advection_directions[q_point] * - scratch_data.fe_values.shape_grad(j, q_point) * - (scratch_data.fe_values.shape_value(i, q_point) + - delta * (scratch_data.advection_directions[q_point] * - scratch_data.fe_values.shape_grad(i, q_point)))) * - scratch_data.fe_values.JxW(q_point)); + ((sd.fe_values.shape_value(i, q_point) + // (phi_i + + delta * (sd.advection_directions[q_point] * // delta beta + sd.fe_values.shape_grad(i, q_point))) * // grad phi_i) + sd.advection_directions[q_point] * // beta + sd.fe_values.shape_grad(j, q_point)) * // grad phi_j + sd.fe_values.JxW(q_point); // dx copy_data.cell_rhs(i) += - ((scratch_data.fe_values.shape_value(i, q_point) + - delta * (scratch_data.advection_directions[q_point] * - scratch_data.fe_values.shape_grad(i, q_point))) * - scratch_data.rhs_values[q_point] * - scratch_data.fe_values.JxW(q_point)); + (sd.fe_values.shape_value(i, q_point) + // (phi_i + + delta * (sd.advection_directions[q_point] * // delta beta + sd.fe_values.shape_grad(i, q_point))) * // grad phi_i) + sd.rhs_values[q_point] * // f + sd.fe_values.JxW(q_point); // dx } // Besides the cell terms which we have built up now, the bilinear