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
base
quadrature_selector.cc
Go to the documentation of this file.
1
// ------------------------------------------------------------------------
2
//
3
// SPDX-License-Identifier: LGPL-2.1-or-later
4
// Copyright (C) 2003 - 2020 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/base/quadrature_lib.h
>
16
#include <
deal.II/base/quadrature_selector.h
>
17
18
DEAL_II_NAMESPACE_OPEN
19
20
21
template
<
int
dim>
22
Quadrature<dim>
23
QuadratureSelector<dim>::create_quadrature
(
const
std::string &s,
24
const
unsigned
int
order)
25
{
26
if
(s ==
"gauss"
)
27
return
QGauss<dim>
(order);
28
else
if
(s ==
"gauss_lobatto"
)
29
return
QGaussLobatto<dim>
(order);
30
else
if
(s ==
"gauss_chebyshev"
)
31
return
QGaussChebyshev<dim>
(order);
32
else
if
(s ==
"gauss_radau_chebyshev"
)
33
return
QGaussRadauChebyshev<dim>
(order);
34
else
if
(s ==
"gauss_lobatto_chebyshev"
)
35
return
QGaussLobattoChebyshev<dim>
(order);
36
else
37
{
38
AssertThrow
(order == 0, ExcInvalidOrder(s, order));
39
40
if
(s ==
"midpoint"
)
41
return
QMidpoint<dim>
();
42
else
if
(s ==
"milne"
)
43
return
QMilne<dim>
();
44
else
if
(s ==
"simpson"
)
45
return
QSimpson<dim>
();
46
// The following name is DEAL_II_DEPRECATED and should be
47
// removed once the 'using' declaration is removed.
48
else
if
(s ==
"trapez"
)
49
return
QTrapezoid<dim>
();
50
else
if
(s ==
"trapezoid"
)
51
return
QTrapezoid<dim>
();
52
else
if
(s ==
"weddle"
)
53
return
QWeddle<dim>
();
54
}
55
56
// we didn't find this name
57
AssertThrow
(
false
, ExcInvalidQuadrature(s));
58
// return something to suppress
59
// stupid warnings by some
60
// compilers
61
return
Quadrature<dim>
();
62
}
23
QuadratureSelector<dim>::create_quadrature
(
const
std::string &s, {
…
}
63
64
65
66
template
<
int
dim>
67
QuadratureSelector<dim>::QuadratureSelector
(
const
std::string &s,
68
const
unsigned
int
order)
69
:
Quadrature
<dim>(create_quadrature(s, order).get_points(),
70
create_quadrature(s, order).get_weights())
71
{}
67
QuadratureSelector<dim>::QuadratureSelector
(
const
std::string &s, {
…
}
72
73
74
75
template
<
int
dim>
76
std::string
77
QuadratureSelector<dim>::get_quadrature_names
()
78
{
79
return
std::string(
80
"gauss|gauss_lobatto|gauss_chebyshev|gauss_radau_chebyshev|gauss_lobatto_chebyshev|midpoint|milne|simpson|trapez|weddle"
);
81
}
77
QuadratureSelector<dim>::get_quadrature_names
() {
…
}
82
83
84
85
// explicit instantiations
86
template
class
QuadratureSelector<1>
;
87
template
class
QuadratureSelector<2>
;
88
template
class
QuadratureSelector<3>
;
89
90
DEAL_II_NAMESPACE_CLOSE
QGaussChebyshev
Definition
quadrature_lib.h:559
QGaussLobattoChebyshev
Definition
quadrature_lib.h:628
QGaussLobatto
Definition
quadrature_lib.h:140
QGaussRadauChebyshev
Definition
quadrature_lib.h:582
QGauss
Definition
quadrature_lib.h:40
QMidpoint
Definition
quadrature_lib.h:162
QMilne
Definition
quadrature_lib.h:205
QSimpson
Definition
quadrature_lib.h:174
QTrapezoid
Definition
quadrature_lib.h:191
QWeddle
Definition
quadrature_lib.h:219
QuadratureSelector
Definition
quadrature_selector.h:41
QuadratureSelector::get_quadrature_names
static std::string get_quadrature_names()
Definition
quadrature_selector.cc:77
QuadratureSelector::QuadratureSelector
QuadratureSelector(const std::string &s, const unsigned int order=0)
Definition
quadrature_selector.cc:67
QuadratureSelector::create_quadrature
static Quadrature< dim > create_quadrature(const std::string &s, const unsigned int order)
Definition
quadrature_selector.cc:23
Quadrature
Definition
quadrature.h:123
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
AssertThrow
#define AssertThrow(cond, exc)
Definition
exceptions.h:1739
quadrature_lib.h
quadrature_selector.h
Generated by
1.11.0