]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update step-11 to use AffineConstraints.
authorDavid Wells <wellsd2@rpi.edu>
Fri, 29 Jun 2018 13:17:29 +0000 (09:17 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 29 Jun 2018 13:17:29 +0000 (09:17 -0400)
examples/step-11/doc/intro.dox
examples/step-11/step-11.cc

index e80f72b36f727a76d47f1974059fa46adade7eff..ed8619296fbf14e182ce4314f6e0315061f54166 100644 (file)
@@ -79,24 +79,25 @@ index), then the constraint can also be represented by
   u_{i_0} = \sum_{i\in\partial\Omega_h\backslash i_0} -u_i.
 @f]
 This, luckily, is exactly the form of constraints for which the
-ConstraintMatrix class was designed. Note that we have used this
+AffineConstraints class was designed. Note that we have used this
 class in several previous examples for the representation of hanging nodes
 constraints, which also have this form: there, the middle vertex shall have
 the mean of the values of the adjacent vertices. In general, the
-ConstraintMatrix class is designed to handle homogeneous constraints
+AffineConstraints class is designed to handle affine constraints
 of the form
 @f[
-  CU = 0
+  CU = b
 @f]
-where $C$ denotes a matrix, and $U$ the vector of nodal values.
+where $C$ denotes a matrix, $b$ denotes a vector, and $U$ the vector of nodal
+values. In this case, since $C$ represents one homogeneous constraint, $b$ is
+the zero vector.
 
 In this example, the mean value along the boundary allows just such a
 representation, with $C$ being a matrix with just one row (i.e. there is only
-one constraint). In the implementation, we will create a
-ConstraintMatrix object, add one constraint (i.e. add another row to
-the matrix) referring to the first boundary node $i_0$, and insert the weights
-with which all the other nodes contribute, which in this example happens to be
-just $-1$.
+one constraint). In the implementation, we will create a AffineConstraints
+object, add one constraint (i.e. add another row to the matrix) referring to the
+first boundary node $i_0$, and insert the weights with which all the other nodes
+contribute, which in this example happens to be just $-1$.
 
 Later, we will use this object to eliminate the first boundary node from the
 linear system of equations, reducing it to one which has a solution without
index 12a7cc4b1b9af5b20ca249321de7781a56e6c58b..61550df2d41b359352c7b47f0f07fc0b22cfd2a9 100644 (file)
@@ -89,9 +89,9 @@ namespace Step11
     DoFHandler<dim>    dof_handler;
     MappingQ<dim>      mapping;
 
-    SparsityPattern      sparsity_pattern;
-    SparseMatrix<double> system_matrix;
-    ConstraintMatrix     mean_value_constraints;
+    SparsityPattern           sparsity_pattern;
+    SparseMatrix<double>      system_matrix;
+    AffineConstraints<double> mean_value_constraints;
 
     Vector<double> solution;
     Vector<double> system_rhs;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.