PolyFEM
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, Eigen::MatrixXd &points, Eigen::VectorXd &weights)
15
{
16
switch
(order)
17
{
18
#include <
polyfem/autogen/auto_triangle.ipp
>
19
20
default
:
21
assert(
false
);
22
};
23
}
24
}
// namespace
25
26
TriQuadrature::TriQuadrature
()
27
{
28
}
29
30
void
TriQuadrature::get_quadrature
(
const
int
order,
Quadrature
&quad)
31
{
32
Quadrature
tmp;
33
34
get_weight_and_points(order, quad.
points
, quad.
weights
);
35
36
assert(fabs(quad.
weights
.sum() - 1) < 1e-14);
37
assert(quad.
points
.minCoeff() >= 0 && quad.
points
.maxCoeff() <= 1);
38
39
assert(quad.
points
.rows() == quad.
weights
.size());
40
41
quad.
weights
/= 2;
42
}
43
}
// namespace quadrature
44
}
// namespace polyfem
LineQuadrature.hpp
quadrature
Quadrature quadrature
Definition
MassMatrixAssembler.cpp:30
TriQuadrature.hpp
auto_triangle.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::get_quadrature
void get_quadrature(const int order, Quadrature &quad)
Definition
TriQuadrature.cpp:30
polyfem::quadrature::TriQuadrature::TriQuadrature
TriQuadrature()
Definition
TriQuadrature.cpp:26
polyfem
Definition
AMIPSEnergy.cpp:6
src
polyfem
quadrature
TriQuadrature.cpp
Generated by
1.9.8