From: Martin Kronbichler Date: Fri, 28 Aug 2009 08:36:24 +0000 (+0000) Subject: Update some obsolete comments. X-Git-Tag: v8.0.0~7219 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3309a3a02a1bd377a5fbd5a85f777d3749c89e51;p=dealii.git Update some obsolete comments. git-svn-id: https://svn.dealii.org/trunk@19349 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index 0d978a9d62..ddb02b3816 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -187,14 +187,9 @@ void LaplaceProblem::setup_system () } } - // This is the standard assemble - // function you have seen a lot of - // times before. - // - // A small difference, though: we - // assemble the matrix for Poisson - // equation so we can solve the - // Dirichlet boundary value problem. + // This is the standard assemble function + // for the Poisson equation you have seen a + // lot of times before. template void LaplaceProblem::assemble_system () { @@ -219,34 +214,20 @@ void LaplaceProblem::assemble_system () cell_matrix = 0; cell_rhs = 0; - // As before, we want the - // FEValues object to compute - // the quantities which we told - // him to compute in the - // constructor using the update - // flags. + // As before, we want the FEValues + // object to compute the quantities + // which we told him to compute in + // the constructor using the update + // flags. Then, we loop over all + // quadrature points and the local + // matrix rows and columns for + // computing the element + // contribution. This is the same as + // in step-4. For the right hand + // side, we use a constant value of + // 1. fe_values.reinit (cell); - // It should be noted that the - // creation of the - // coefficient_values object is - // done outside the loop over - // all cells to avoid memory - // allocation each time we - // visit a new cell. - - // With all this, the loops - // then look like this (the - // parentheses around the - // product of the two gradients - // are needed to indicate the - // dot product; we have to - // overrule associativity of - // the operator* here, since - // the compiler would otherwise - // complain about an undefined - // product of double*gradient - // since it parses - // left-to-right): + for (unsigned int q_point=0; q_point::assemble_system () * fe_values.shape_grad(j,q_point)) * fe_values.JxW(q_point); - // For the right hand - // side, a constant value - // is used again: cell_rhs(i) += (fe_values.shape_value(i,q_point) * 1.0 * fe_values.JxW(q_point)); }; - cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i::assemble_system () // conditions on the finest level // are handled as usual. std::map boundary_values; - + VectorTools::interpolate_boundary_values (mg_dof_handler, 0, ZeroFunction(), boundary_values); - - + MatrixTools::apply_boundary_values (boundary_values, system_matrix, solution, system_rhs); - - }