Reference documentation for deal.II version GIT relicensing-245-g36f19064f7 2024-03-29 07:20:02+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: LGPL-2.1-or-later
4// Copyright (C) 2016 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_schur_complement_h
16#define dealii_schur_complement_h
17
18#include <deal.II/base/config.h>
19
21
25
26
28
241template <typename Range_1,
242 typename Domain_1,
243 typename Range_2,
244 typename Domain_2,
245 typename Payload>
251{
252 // We return the result of the compound LinearOperator
253 // directly, so as to ensure that the underlying Payload
254 // definition aligns with the operations expressed here.
255 // All of the memory allocations etc. are taken care of
256 // internally.
257 if (D.is_null_operator == false)
258 return D - C * A_inv * B;
259 else
260 return -1.0 * C * A_inv * B;
261}
262
292template <typename Range_1,
293 typename Domain_1,
294 typename Range_2,
295 typename Payload>
299 const Range_1 &f,
300 const Range_2 &g)
301{
302 // We return the result of the compound PackagedOperation
303 // directly, so as to ensure that the underlying Payload
304 // definition aligns with the operations expressed here.
305 // All of the memory allocations etc. are taken care of
306 // internally.
307 return g - C * A_inv * f;
308}
309
330template <typename Range_1,
331 typename Domain_1,
332 typename Domain_2,
333 typename Payload>
338 const Domain_2 &y,
339 const Range_1 &f)
340{
341 // We return the result of the compound PackagedOperation
342 // directly, so as to ensure that the underlying Payload
343 // definition aligns with the operations expressed here.
344 // All of the memory allocations etc. are taken care of
345 // internally.
346 return A_inv * (f - B * y);
347}
348
352
353#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
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)