From: wolf Date: Fri, 8 Apr 2005 21:23:16 +0000 (+0000) Subject: Add more comments. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ececdc2ad1547ed5e245dadf4961440f17e0332a;p=dealii-svn.git Add more comments. git-svn-id: https://svn.dealii.org/trunk@10452 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_constraints.h b/deal.II/deal.II/include/dofs/dof_constraints.h index 95adfa5b46..26f2171f96 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.h @@ -698,6 +698,46 @@ class ConstraintMatrix : public Subscriptor * advisable to have the list of * fixed nodes available when * calling the present function. + * + * However, it is worth noting + * that even though the the + * function obtains the list of + * boundary nodes, this does not + * guarantee that the boundary + * values will be correct after + * solving the linear system. The + * reason is that the for fixed + * (boundary) nodes, the matrix + * has an empty row and column + * except for the diagonal entry, + * and the value of the solution + * vector for this dof is the + * right hand side value divided + * by the diagonal entry. In + * order to guarantee that the + * resulting value is correct, we + * need to have knowledge of both + * the matrix and the right hand + * side vector, something that + * the + * MatrixTools::apply_boundary_values + * function does but this one + * does not. Therefore, unless + * you want to handle boundary + * values yourself after + * assembling the matrix by + * adjusting the diagonal entries + * of the matrix and the rows of + * the right hand side vector of + * the fixed nodes, it is advised + * to not call this function here + * directly, but rather to call + * the + * distribute_local_to_global() + * function that does the work + * for the matrix and right hand + * side vector at the same time, + * as demonstrated in step-17. */ template void @@ -788,6 +828,46 @@ class ConstraintMatrix : public Subscriptor * advisable to have the list of * fixed nodes available when * calling the present function. + * + * However, it is worth noting + * that even though the the + * function obtains the list of + * boundary nodes, this does not + * guarantee that the boundary + * values will be correct after + * solving the linear system. The + * reason is that the for fixed + * (boundary) nodes, the matrix + * has an empty row and column + * except for the diagonal entry, + * and the value of the solution + * vector for this dof is the + * right hand side value divided + * by the diagonal entry. In + * order to guarantee that the + * resulting value is correct, we + * need to have knowledge of both + * the matrix and the right hand + * side vector, something that + * the + * MatrixTools::apply_boundary_values + * function does but this one + * does not. Therefore, unless + * you want to handle boundary + * values yourself after + * assembling the matrix by + * adjusting the diagonal entries + * of the matrix and the rows of + * the right hand side vector of + * the fixed nodes, it is advised + * to not call this function here + * directly, but rather to call + * the + * distribute_local_to_global() + * function that does the work + * for the matrix and right hand + * side vector at the same time, + * as demonstrated in step-17. */ template void