From: Jean-Paul Pelteret Date: Tue, 11 Sep 2018 19:53:46 +0000 (+0200) Subject: Extend constrained linear operators to work with any LinOp Payload. X-Git-Tag: v9.1.0-rc1~719^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba52ea2aece6d10ba90d4627dcf54c8ae88ecaef;p=dealii.git Extend constrained linear operators to work with any LinOp Payload. --- diff --git a/include/deal.II/lac/constrained_linear_operator.h b/include/deal.II/lac/constrained_linear_operator.h index 201d6bc299..beb1e23f49 100644 --- a/include/deal.II/lac/constrained_linear_operator.h +++ b/include/deal.II/lac/constrained_linear_operator.h @@ -59,13 +59,13 @@ DEAL_II_NAMESPACE_OPEN * @relatesalso LinearOperator * @ingroup constraints */ -template -LinearOperator +template +LinearOperator distribute_constraints_linear_operator( const AffineConstraints &constraints, - const LinearOperator & exemplar) + const LinearOperator & exemplar) { - LinearOperator return_op = exemplar; + LinearOperator return_op = exemplar; return_op.vmult_add = [&constraints](Range &v, const Domain &u) { Assert(!dealii::PointerComparison::equal(&v, &u), @@ -155,13 +155,13 @@ distribute_constraints_linear_operator( * @relatesalso LinearOperator * @ingroup constraints */ -template -LinearOperator +template +LinearOperator project_to_constrained_linear_operator( const AffineConstraints &constraints, - const LinearOperator & exemplar) + const LinearOperator & exemplar) { - LinearOperator return_op = exemplar; + LinearOperator return_op = exemplar; return_op.vmult_add = [&constraints](Range &v, const Domain &u) { const auto &locally_owned_elements = v.locally_owned_elements(); @@ -246,11 +246,11 @@ project_to_constrained_linear_operator( * @relatesalso LinearOperator * @ingroup constraints */ -template -LinearOperator +template +LinearOperator constrained_linear_operator( const AffineConstraints &constraints, - const LinearOperator & linop) + const LinearOperator & linop) { const auto C = distribute_constraints_linear_operator(constraints, linop); const auto Ct = transpose_operator(C); @@ -293,11 +293,11 @@ constrained_linear_operator( * @relatesalso LinearOperator * @ingroup constraints */ -template +template PackagedOperation constrained_right_hand_side( const AffineConstraints &constraints, - const LinearOperator & linop, + const LinearOperator & linop, const Range & right_hand_side) { PackagedOperation return_comp;