|
PolyFEM
|
Functions | |
| integrate_exact (f) | |
| integrate_approx (f, scheme) | |
| list_schemes () | |
| generate_monomials (order) | |
| is_valid (scheme, tol=1e-6, relaxed=False) | |
| pick_scheme (all_schemes, order, relaxed=False) | |
| generate_cpp (selected_schemes) | |
| main () | |
Variables | |
| b | |
| pyramid.generate_cpp | ( | selected_schemes | ) |
Generate cpp code to fill points & weights.
Definition at line 155 of file pyramid.py.
Referenced by main().
| pyramid.generate_monomials | ( | order | ) |
Generate trivariate monomials up to given order.
Definition at line 68 of file pyramid.py.
Referenced by pick_scheme().
| pyramid.integrate_approx | ( | f, | |
| scheme | |||
| ) |
Integrate numerically over the reference tetrahedron.
Definition at line 37 of file pyramid.py.
Referenced by pick_scheme().
| pyramid.integrate_exact | ( | f | ) |
Integrate a function over the reference pyramid:
0 <= z <= 1
0 <= x <= (1 - z)
0 <= y <= (1 - z)
Definition at line 17 of file pyramid.py.
Referenced by pick_scheme().
| pyramid.is_valid | ( | scheme, | |
tol = 1e-6, |
|||
relaxed = False |
|||
| ) |
A scheme is valid if:
1. weights sum to 1
2. weights positive
3. points inside reference pyramid:
0 <= z <= 1
|x|, |y| <= 1 - z
Definition at line 82 of file pyramid.py.
Referenced by pick_scheme().
| pyramid.list_schemes | ( | ) |
List all existing schemes for tetrahedra.
Definition at line 51 of file pyramid.py.
Referenced by main().
| pyramid.main | ( | ) |
Definition at line 184 of file pyramid.py.
References generate_cpp(), list_schemes(), main(), and pick_scheme().
Referenced by main().
| pyramid.pick_scheme | ( | all_schemes, | |
| order, | |||
relaxed = False |
|||
| ) |
Picks the best scheme for a given polynomial degree, following this strategy: - Tries all schemes with the same order as required. - Eliminate schemes with weights that do not sum up to 1, or points that lie outside the reference triangle. - Among the remaining schemes, compare the integration error over all bivariate monomials of inferior order. - Keeps only the scheme with total integration error lower than a certain threshold. - Among those, keep the one with fewer number of integration points. - Finally, break ties using the integration error accumulated over the monomials.
Definition at line 115 of file pyramid.py.
References generate_monomials(), integrate_approx(), integrate_exact(), and is_valid().
Referenced by main().
| pyramid.b |
Definition at line 9 of file pyramid.py.