Reference documentation for deal.II version 9.4.1
\(\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// Copyright (C) 2015 - 2020 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_schur_complement_h
17#define dealii_schur_complement_h
18
19#include <deal.II/base/config.h>
20
22
26
27
29
34
242template <typename Range_1,
243 typename Domain_1,
244 typename Range_2,
245 typename Domain_2,
246 typename Payload>
252{
253 // We return the result of the compound LinearOperator
254 // directly, so as to ensure that the underlying Payload
255 // definition aligns with the operations expressed here.
256 // All of the memory allocations etc. are taken care of
257 // internally.
258 if (D.is_null_operator == false)
259 return D - C * A_inv * B;
260 else
261 return -1.0 * C * A_inv * B;
262}
263
265
266
271
293template <typename Range_1,
294 typename Domain_1,
295 typename Range_2,
296 typename Payload>
300 const Range_1 & f,
301 const Range_2 & g)
302{
303 // We return the result of the compound PackagedOperation
304 // directly, so as to ensure that the underlying Payload
305 // definition aligns with the operations expressed here.
306 // All of the memory allocations etc. are taken care of
307 // internally.
308 return g - C * A_inv * f;
309}
310
331template <typename Range_1,
332 typename Domain_1,
333 typename Domain_2,
334 typename Payload>
339 const Domain_2 & y,
340 const Range_1 & f)
341{
342 // We return the result of the compound PackagedOperation
343 // directly, so as to ensure that the underlying Payload
344 // definition aligns with the operations expressed here.
345 // All of the memory allocations etc. are taken care of
346 // internally.
347 return A_inv * (f - B * y);
348}
349
351
353
354#endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
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)