deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
schur_complement.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2016 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_schur_complement_h
14#define dealii_schur_complement_h
15
16#include <deal.II/base/config.h>
17
19
23
24
26
239template <typename Range_1,
240 typename Domain_1,
241 typename Range_2,
242 typename Domain_2,
243 typename Payload>
249{
250 // We return the result of the compound LinearOperator
251 // directly, so as to ensure that the underlying Payload
252 // definition aligns with the operations expressed here.
253 // All of the memory allocations etc. are taken care of
254 // internally.
255 if (D.is_null_operator == false)
256 return D - C * A_inv * B;
257 else
258 return -1.0 * C * A_inv * B;
259}
260
290template <typename Range_1,
291 typename Domain_1,
292 typename Range_2,
293 typename Payload>
297 const Range_1 &f,
298 const Range_2 &g)
299{
300 // We return the result of the compound PackagedOperation
301 // directly, so as to ensure that the underlying Payload
302 // definition aligns with the operations expressed here.
303 // All of the memory allocations etc. are taken care of
304 // internally.
305 return g - C * A_inv * f;
306}
307
328template <typename Range_1,
329 typename Domain_1,
330 typename Domain_2,
331 typename Payload>
336 const Domain_2 &y,
337 const Range_1 &f)
338{
339 // We return the result of the compound PackagedOperation
340 // directly, so as to ensure that the underlying Payload
341 // definition aligns with the operations expressed here.
342 // All of the memory allocations etc. are taken care of
343 // internally.
344 return A_inv * (f - B * y);
345}
346
350
351#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
PackagedOperation< Range_2 > condense_schur_rhs(const LinearOperator< Range_1, Domain_1, Payload > &A_inv, const LinearOperator< Range_2, Domain_1, Payload > &C, const Range_1 &f, const Range_2 &g)
LinearOperator< Range_2, Domain_2, Payload > schur_complement(const LinearOperator< Domain_1, Range_1, Payload > &A_inv, const LinearOperator< Range_1, Domain_2, Payload > &B, const LinearOperator< Range_2, Domain_1, Payload > &C, const LinearOperator< Range_2, Domain_2, Payload > &D)
PackagedOperation< Domain_1 > postprocess_schur_solution(const LinearOperator< Range_1, Domain_1, Payload > &A_inv, const LinearOperator< Range_1, Domain_2, Payload > &B, const Domain_2 &y, const Range_1 &f)