Loading [MathJax]/extensions/TeX/newcommand.js
Reference documentation for deal.II version 9.6.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\}}
Toggle main menu visibility
Main Page
Tutorial
Code gallery
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerations
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
v
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
b
c
d
e
f
g
i
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Symbols
:
a
b
c
d
f
g
i
l
m
n
o
p
r
s
t
u
v
Related Pages
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
v
Variables
a
c
d
e
f
g
h
i
k
l
m
n
o
p
s
t
u
v
Typedefs
Enumerations
Enumerator
m
u
Macros
a
b
d
e
f
h
i
m
p
s
t
dealii.org
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
source
multigrid
mg_transfer_global_coarsening.cc
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
//
3
// SPDX-License-Identifier: LGPL-2.1-or-later
4
// Copyright (C) 2020 - 2024 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
#include <deal.II/multigrid/mg_transfer_global_coarsening.templates.h>
16
17
DEAL_II_NAMESPACE_OPEN
18
19
namespace
MGTransferGlobalCoarseningTools
20
{
21
unsigned
int
22
create_next_polynomial_coarsening_degree
(
23
const
unsigned
int
previous_fe_degree,
24
const
PolynomialCoarseningSequenceType
&p_sequence)
25
{
26
switch
(p_sequence)
27
{
28
case
PolynomialCoarseningSequenceType::bisect
:
29
return
std::max
(previous_fe_degree / 2, 1u);
30
case
PolynomialCoarseningSequenceType::decrease_by_one
:
31
return
std::max
(previous_fe_degree - 1, 1u);
32
case
PolynomialCoarseningSequenceType::go_to_one
:
33
return
1u;
34
default
:
35
DEAL_II_NOT_IMPLEMENTED
();
36
return
1u;
37
}
38
}
22
create_next_polynomial_coarsening_degree
( {
…
}
39
40
41
42
std::vector<unsigned int>
43
create_polynomial_coarsening_sequence
(
44
const
unsigned
int
max_degree,
45
const
PolynomialCoarseningSequenceType
&p_sequence)
46
{
47
std::vector<unsigned int> degrees{max_degree};
48
49
while
(degrees.back() > 1)
50
degrees.push_back(
51
create_next_polynomial_coarsening_degree
(degrees.back(), p_sequence));
52
53
std::reverse(degrees.begin(), degrees.end());
54
55
return
degrees;
56
}
43
create_polynomial_coarsening_sequence
( {
…
}
57
}
// namespace MGTransferGlobalCoarseningTools
58
59
#include "mg_transfer_global_coarsening.inst"
60
61
DEAL_II_NAMESPACE_CLOSE
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition
config.h:503
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition
config.h:504
DEAL_II_NOT_IMPLEMENTED
#define DEAL_II_NOT_IMPLEMENTED()
Definition
exceptions.h:1814
MGTransferGlobalCoarseningTools
Definition
mg_transfer_global_coarsening.h:110
MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType
PolynomialCoarseningSequenceType
Definition
mg_transfer_global_coarsening.h:119
MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType::go_to_one
@ go_to_one
MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType::decrease_by_one
@ decrease_by_one
MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType::bisect
@ bisect
MGTransferGlobalCoarseningTools::create_next_polynomial_coarsening_degree
unsigned int create_next_polynomial_coarsening_degree(const unsigned int degree, const PolynomialCoarseningSequenceType &p_sequence)
Definition
mg_transfer_global_coarsening.cc:22
MGTransferGlobalCoarseningTools::create_polynomial_coarsening_sequence
std::vector< unsigned int > create_polynomial_coarsening_sequence(const unsigned int max_degree, const PolynomialCoarseningSequenceType &p_sequence)
Definition
mg_transfer_global_coarsening.cc:43
std::max
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
Definition
vectorization.h:6943
Generated by
1.11.0