From: Wolfgang Bangerth Date: Thu, 11 Sep 2003 15:42:06 +0000 (+0000) Subject: Fix evaluation of the system matrix. X-Git-Tag: v8.0.0~16237 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c866786aa8ed156bdd2e92d827b0860f733439c1;p=dealii.git Fix evaluation of the system matrix. git-svn-id: https://svn.dealii.org/trunk@7973 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index 0d866a3f78..86174d3568 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -584,20 +584,28 @@ void ElasticProblem::assemble_system () cell_matrix(i,j) += // This first term is - // ((lambda+mu) d_i u_i, d_j v_j). + // (lambda d_i u_i, d_j v_j) + // + (mu d_i u_j, d_j v_i). // Note that // ``shape_grad(i,q_point)'' // returns the // gradient of + // the only + // nonzero + // component of // the i-th shape // function at // quadrature // point // q_point. The // component - // ``comp(i)'', + // ``comp(i)'' of + // the gradient, // which is the // derivative of + // this only + // nonzero vector + // component of // the i-th shape // function with // respect to the @@ -609,8 +617,11 @@ void ElasticProblem::assemble_system () ( (fe_values.shape_grad(i,q_point)[component_i] * fe_values.shape_grad(j,q_point)[component_j] * - (lambda_values[q_point] + - mu_values[q_point])) + lambda_values[q_point]) + + + (fe_values.shape_grad(i,q_point)[component_j] * + fe_values.shape_grad(j,q_point)[component_i] * + mu_values[q_point]) + // The second term is // (mu nabla u_i, nabla v_j).