PolyFEM
Loading...
Searching...
No Matches
TetQuadrature.cpp
Go to the documentation of this file.
1
#include "
TetQuadrature.hpp
"
2
#include "
LineQuadrature.hpp
"
3
4
#include <vector>
5
#include <cassert>
6
#include <cmath>
7
#include <iostream>
8
9
namespace
polyfem
10
{
11
namespace
quadrature
12
{
13
namespace
14
{
15
void
get_weight_and_points(
const
int
order, Eigen::MatrixXd &points, Eigen::VectorXd &weights)
16
{
17
switch
(order)
18
{
19
#include <
polyfem/autogen/auto_tetrahedron.ipp
>
20
21
default
:
22
assert(
false
);
23
};
24
}
25
}
// namespace
26
27
TetQuadrature::TetQuadrature
()
28
{
29
}
30
31
void
TetQuadrature::get_quadrature
(
const
int
order,
Quadrature
&quad)
32
{
33
Quadrature
tmp;
34
35
get_weight_and_points(order, quad.
points
, quad.
weights
);
36
37
assert(fabs(quad.
weights
.sum() - 1) < 1e-12);
38
assert(quad.
points
.minCoeff() >= 0 && quad.
points
.maxCoeff() <= 1);
39
40
assert(quad.
points
.rows() == quad.
weights
.size());
41
42
quad.
weights
/= 6;
43
}
44
}
// namespace quadrature
45
}
// namespace polyfem
LineQuadrature.hpp
quadrature
Quadrature quadrature
Definition
MassMatrixAssembler.cpp:30
TetQuadrature.hpp
auto_tetrahedron.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::TetQuadrature::get_quadrature
void get_quadrature(const int order, Quadrature &quad)
Definition
TetQuadrature.cpp:31
polyfem::quadrature::TetQuadrature::TetQuadrature
TetQuadrature()
Definition
TetQuadrature.cpp:27
polyfem
Definition
AMIPSEnergy.cpp:6
src
polyfem
quadrature
TetQuadrature.cpp
Generated by
1.9.8