* <h3>Applying constraints indirectly with a LinearOperator</h3>
*
* Sometimes it is either not desirable, or not possible to directly
- * condensate, or eliminate constraints from a system of linear equations.
- * In particular if there is no underlying matrix object that could be
+ * condense, or eliminate constraints from a system of linear equations. In
+ * particular if there is no underlying matrix object that could be
* condensed (or taken care of constraints during assembly). This is
* usually the case if the system is described by a LinearOperator.
*
* @f[
* (C^T A C + Id_c) \tilde x = C^T (b - A\,k)
* @f]
- * instead [1]. Here, $A$ is a given (unconstrained) system matrix $A$ and
- * $b$ the corresponding right hand side of a system of linear equations
+ * instead [1] (M. S. Shephard: Linear multipoint constraints applied via
+ * transformation as part of a direct stiffness assembly process, 1985).
+ *
+ * Here, $A$ is a given (unconstrained) system matrix and $b$
+ * the corresponding right hand side of a system of linear equations
* $A\,x=b$. The matrix $C$ describes the homogeneous part of the linear
* constraints stored in a ConstraintMatrix and the vector $k$ is the
* vector of corresponding inhomogeneities. More precisely, the
* And finally, $Id_c$ denotes the identity on the subspace of constrained
* degrees of freedom.
*
- * The corresponding solution of $A\,x=b$ that obeys boundary conditions is
+ * The corresponding solution of $A\,x=b$ that obeys these constraints is
* then recovered by distributing constraints: $x=C\tilde x+k$.
*
* The whole system can be set up and solved with the following snippet of
* code:
* @code
- * #include <deal.II/lac/constraint_linear_operator.h>
+ * #include <deal.II/lac/constrained_linear_operator.h>
*
* // ...
*
* solver.solve(op_amod, solution, rhs_mod, preconditioner);
* constraint_matrix.distribute(solution);
* @endcode
- *
- * [1] M. S. Shephard: Linear multipoint constraints applied via
- * transformation as part of a direct stiffness assembly process, 1985.
*/
<h3>General</h3>
<ol>
<li> New: constrained_linear_operator() and constrained_right_hand_side()
- implemented that provide a generic mechanism of applying constraints to a
- LinearOperator. A detailed explanation with example code is given in the
- @ref constraints module.
+ provide a generic mechanism of applying constraints to a LinearOperator.
+ A detailed explanation with example code is given in the @ref constraints
+ module.
<br>
(Mauro Bardelloni, Matthias Maier, 2015/10/25 - 2015/12/27)
</li>
//
// ---------------------------------------------------------------------
-#ifndef dealii__constraint_linear_operator_h
-#define dealii__constraint_linear_operator_h
+#ifndef dealii__constrained_linear_operator_h
+#define dealii__constrained_linear_operator_h
#include <deal.II/lac/linear_operator.h>
#include <deal.II/lac/packaged_operation.h>
/**
- * This function takes a ConstraintMatrix @p cm and an operator exemplar @p
- * exemplar (this exemplar is usually a linear operator that describes the
- * system matrix) and returns a LinearOperator object associated with the
- * "homogeneous action" of the underlying ConstraintMatrix object:
+ * This function takes a ConstraintMatrix @p constraint_matrix and an
+ * operator exemplar @p exemplar (this exemplar is usually a linear
+ * operator that describes the system matrix) and returns a LinearOperator
+ * object associated with the "homogeneous action" of the underlying
+ * ConstraintMatrix object:
*
* Applying the LinearOperator object on a vector <code>u</code> results in
* a vector <code>v</code> that stores the result of calling
* ConstraintMatrix::distribute() on <code>u</code> - with one important
- * difference; inhomogeneities are note applied, but always treated as 0
+ * difference: inhomogeneities are note applied, but always treated as 0
* instead.
*
* The LinearOperator object created by this function is primarily used
#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/lac/linear_operator.h>
#include <deal.II/lac/packaged_operation.h>
-#include <deal.II/lac/constraint_linear_operator.h>
+#include <deal.II/lac/constrained_linear_operator.h>
#include <fstream>
#include <iostream>
const auto A = linear_operator(system_matrix_lo);
const auto M = constrained_linear_operator(constraints, A);
- Vector<double> rhs =
- constrained_right_hand_side(constraints, A, system_rhs_lo);
+ const auto rhs = constrained_right_hand_side(constraints, A,
+ system_rhs_lo);
check_solver_within_range(
solver.solve(M, solution_lo, rhs, preconditioner),