Reference documentation for deal.II version 9.2.0
\(\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\}}\)
schur_complement.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2015 - 2018 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 
243 template <typename Range_1,
244  typename Domain_1,
245  typename Range_2,
246  typename Domain_2,
247  typename Payload>
253 {
254  // We return the result of the compound LinearOperator
255  // directly, so as to ensure that the underlying Payload
256  // definition aligns with the operations expressed here.
257  // All of the memory allocations etc. are taken care of
258  // internally.
259  if (D.is_null_operator == false)
260  return D - C * A_inv * B;
261  else
262  return -1.0 * C * A_inv * B;
263 }
264 
266 
267 
272 
295 template <typename Range_1,
296  typename Domain_1,
297  typename Range_2,
298  typename Payload>
302  const Range_1 & f,
303  const Range_2 & g)
304 {
305  // We return the result of the compound PackagedOperation
306  // directly, so as to ensure that the underlying Payload
307  // definition aligns with the operations expressed here.
308  // All of the memory allocations etc. are taken care of
309  // internally.
310  return g - C * A_inv * f;
311 }
312 
334 template <typename Range_1,
335  typename Domain_1,
336  typename Domain_2,
337  typename Payload>
342  const Domain_2 & y,
343  const Range_1 & f)
344 {
345  // We return the result of the compound PackagedOperation
346  // directly, so as to ensure that the underlying Payload
347  // definition aligns with the operations expressed here.
348  // All of the memory allocations etc. are taken care of
349  // internally.
350  return A_inv * (f - B * y);
351 }
352 
354 
356 
357 #endif
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
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)
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
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< 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)