Loading [MathJax]/jax/input/TeX/config.js
PolyFEM
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
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
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Typedefs
Enumerations
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
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
Typedefs
b
c
d
e
f
g
h
l
m
n
o
p
q
s
t
v
Enumerations
Related Symbols
a
c
e
g
i
l
o
p
s
Files
File List
File Members
All
_
a
c
d
e
f
g
h
i
j
l
m
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
c
d
e
f
g
i
l
m
q
s
t
v
w
x
y
z
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
TriQuadrature.cpp
Go to the documentation of this file.
1
#include "
TriQuadrature.hpp
"
2
#include "
LineQuadrature.hpp
"
3
4
#include <vector>
5
#include <cassert>
6
#include <cmath>
7
8
namespace
polyfem
9
{
10
namespace
quadrature
11
{
12
namespace
13
{
14
void
get_weight_and_points(
const
int
order,
const
bool
use_corner_quadrature, Eigen::MatrixXd &points, Eigen::VectorXd &weights)
15
{
16
if
(use_corner_quadrature)
17
{
18
switch
(order)
19
{
20
#include <
polyfem/autogen/auto_triangle_corner.ipp
>
21
22
default
:
23
assert(
false
);
24
};
25
}
26
else
27
{
28
switch
(order)
29
{
30
#include <
polyfem/autogen/auto_triangle.ipp
>
31
32
default
:
33
assert(
false
);
34
};
35
}
36
}
37
}
// namespace
38
39
TriQuadrature::TriQuadrature
(
bool
use_corner_quadrature) : use_corner_quadrature_(use_corner_quadrature)
40
{
41
}
39
TriQuadrature::TriQuadrature
(
bool
use_corner_quadrature) : use_corner_quadrature_(use_corner_quadrature) {
…
}
42
43
void
TriQuadrature::get_quadrature
(
const
int
order,
Quadrature
&quad)
44
{
45
Quadrature
tmp;
46
47
get_weight_and_points(order,
use_corner_quadrature_
, quad.
points
, quad.
weights
);
48
49
assert(
use_corner_quadrature_
|| fabs(quad.
weights
.sum() - 1) < 1e-14);
50
assert(quad.
points
.minCoeff() >= 0 && quad.
points
.maxCoeff() <= 1);
51
52
assert(quad.
points
.rows() == quad.
weights
.size());
53
54
quad.
weights
/= 2;
55
}
43
void
TriQuadrature::get_quadrature
(
const
int
order,
Quadrature
&quad) {
…
}
56
}
// namespace quadrature
57
}
// namespace polyfem
LineQuadrature.hpp
quadrature
Quadrature quadrature
Definition
MassMatrixAssembler.cpp:30
TriQuadrature.hpp
auto_triangle.ipp
auto_triangle_corner.ipp
polyfem::quadrature::Quadrature
Definition
Quadrature.hpp:9
polyfem::quadrature::Quadrature::points
Eigen::MatrixXd points
Definition
Quadrature.hpp:11
polyfem::quadrature::Quadrature::weights
Eigen::VectorXd weights
Definition
Quadrature.hpp:12
polyfem::quadrature::TriQuadrature::use_corner_quadrature_
bool use_corner_quadrature_
Definition
TriQuadrature.hpp:17
polyfem::quadrature::TriQuadrature::get_quadrature
void get_quadrature(const int order, Quadrature &quad)
Definition
TriQuadrature.cpp:43
polyfem::quadrature::TriQuadrature::TriQuadrature
TriQuadrature(bool use_corner_quadrature=false)
Definition
TriQuadrature.cpp:39
polyfem
Definition
AMIPSEnergy.cpp:6
src
polyfem
quadrature
TriQuadrature.cpp
Generated by
1.9.8