<h3>Specific improvements</h3>
<ol>
+ <li>Fixed: Calling FEValuesViews::Vector::get_function_curls() computed
+ wrong results in some cases (see https://code.google.com/p/dealii/issues/detail?id=182).
+ This is now fixed.
+ <br>
+ (Christoph Heiniger, Wolfgang Bangerth, 2014/02/03)
+
<li>Added: The class LAPACKFullMatrix now implements interfaces to
matrix-matrix multiplication. Also, LAPACKFullMatrix::apply_lu_factorization
now also operates on multiple right hand sides in form of another
const dealii::Tensor<1, spacedim> *shape_gradient_ptr =
&shape_gradients[snc][0];
- switch (shape_function_data[shape_function].single_nonzero_component_index)
- {
- case 0:
- {
- for (unsigned int q_point = 0;
- q_point < n_quadrature_points; ++q_point)
- curls[q_point][0] -= value * (*shape_gradient_ptr++)[1];
-
- break;
- }
-
- default:
- for (unsigned int q_point = 0;
- q_point < n_quadrature_points; ++q_point)
- curls[q_point][0] += value * (*shape_gradient_ptr)[0];
- }
+ Assert (shape_function_data[shape_function].single_nonzero_component >= 0,
+ ExcInternalError());
+ // we're in 2d, so the formula for the curl is simple:
+ if (shape_function_data[shape_function].single_nonzero_component_index == 0)
+ for (unsigned int q_point = 0;
+ q_point < n_quadrature_points; ++q_point)
+ curls[q_point][0] -= value * (*shape_gradient_ptr++)[1];
+ else
+ for (unsigned int q_point = 0;
+ q_point < n_quadrature_points; ++q_point)
+ curls[q_point][0] += value * (*shape_gradient_ptr++)[0];
}
else
+ // we have multiple non-zero components in the shape functions. not
+ // all of them must necessarily be within the 2-component window
+ // this FEValuesViews::Vector object considers, however.
{
if (shape_function_data[shape_function].is_nonzero_shape_function_component[0])
{
break;
}
- default:
+ case 2:
+ {
for (unsigned int q_point = 0;
q_point < n_quadrature_points; ++q_point)
{
curls[q_point][0] += value * (*shape_gradient_ptr)[1];
curls[q_point][1] -= value * (*shape_gradient_ptr++)[0];
}
+ break;
+ }
+
+ default:
+ Assert (false, ExcInternalError());
}
}
else
+ // we have multiple non-zero components in the shape functions. not
+ // all of them must necessarily be within the 3-component window
+ // this FEValuesViews::Vector object considers, however.
{
if (shape_function_data[shape_function].is_nonzero_shape_function_component[0])
{
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr);
- FE_Nedelec<dim> fe(3);
+ FESystem<dim> fe(FE_Q<dim>(2), dim);
test(tr, fe);
}
-DEAL::FE=FESystem<2>[FE_Q<2>(1)^2]
-DEAL:: curls[q]= -2.00
-DEAL:: grads[q]= 2.00 4.00 2.00 4.00
-DEAL:: curls[q]= -2.00
-DEAL:: grads[q]= 2.00 4.00 2.00 4.00
-DEAL:: curls[q]= -2.00
-DEAL:: grads[q]= 2.00 4.00 2.00 4.00
-DEAL:: curls[q]= -2.00
-DEAL:: grads[q]= 2.00 4.00 2.00 4.00
-DEAL::FE=FESystem<3>[FE_Q<3>(1)^3]
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
-DEAL:: curls[q]= -6.00 9.00 -3.00
-DEAL:: grads[q]= 3.00 6.00 12.0 3.00 6.00 12.0 3.00 6.00 12.0
+DEAL::FE=FESystem<2>[FE_Q<2>(2)^2]
+DEAL:: curls[q]= 0.423
+DEAL:: grads[q]= 0.00 0.00 0.423 8.33e-16
+DEAL:: curls[q]= 1.58
+DEAL:: grads[q]= 0.00 0.00 1.58 -1.11e-16
+DEAL:: curls[q]= 0.423
+DEAL:: grads[q]= 0.00 0.00 0.423 -6.66e-16
+DEAL:: curls[q]= 1.58
+DEAL:: grads[q]= 0.00 0.00 1.58 2.22e-16