Reference documentation for deal.II version GIT c14369f203 2023-10-01 07:40: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\}}\)
source
multigrid
mg_base.cc
Go to the documentation of this file.
1
// ---------------------------------------------------------------------
2
//
3
// Copyright (C) 1999 - 2021 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
#include <
deal.II/lac/block_vector.h
>
17
#include <
deal.II/lac/la_parallel_block_vector.h
>
18
#include <
deal.II/lac/la_parallel_vector.h
>
19
#include <
deal.II/lac/petsc_block_vector.h
>
20
#include <
deal.II/lac/trilinos_epetra_vector.h
>
21
#include <
deal.II/lac/trilinos_parallel_block_vector.h
>
22
#include <
deal.II/lac/trilinos_tpetra_vector.h
>
23
#include <
deal.II/lac/trilinos_vector.h
>
24
#include <
deal.II/lac/vector.h
>
25
26
#include <
deal.II/multigrid/mg_base.h
>
27
28
29
DEAL_II_NAMESPACE_OPEN
30
31
32
template
<
typename
VectorType>
33
void
34
MGSmootherBase<VectorType>::apply
(
const
unsigned
int
level
,
35
VectorType &u,
36
const
VectorType &rhs)
const
37
{
38
u =
typename
VectorType::value_type(0.);
39
smooth(
level
, u, rhs);
40
}
41
42
43
44
template
<
typename
VectorType>
45
void
46
MGTransferBase<VectorType>::prolongate_and_add
(
const
unsigned
int
to_level,
47
VectorType &dst,
48
const
VectorType &src)
const
49
{
50
VectorType temp;
51
temp.reinit(dst,
true
);
52
53
this->prolongate(to_level, temp, src);
54
55
dst += temp;
56
}
57
58
59
// Explicit instantiations
60
61
#include "mg_base.inst"
62
63
DEAL_II_NAMESPACE_CLOSE
block_vector.h
MGSmootherBase::apply
virtual void apply(const unsigned int level, VectorType &u, const VectorType &rhs) const
Definition:
mg_base.cc:34
MGTransferBase::prolongate_and_add
virtual void prolongate_and_add(const unsigned int to_level, VectorType &dst, const VectorType &src) const
Definition:
mg_base.cc:46
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition:
config.h:477
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition:
config.h:478
level
unsigned int level
Definition:
grid_out.cc:4617
la_parallel_block_vector.h
la_parallel_vector.h
mg_base.h
petsc_block_vector.h
trilinos_epetra_vector.h
trilinos_parallel_block_vector.h
trilinos_tpetra_vector.h
trilinos_vector.h
vector.h
Generated by
1.9.1