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 () | |
tetrahedron.generate_cpp | ( | selected_schemes | ) |
Generate cpp code to fill points & weights.
Definition at line 142 of file tetrahedron.py.
Referenced by main().
tetrahedron.generate_monomials | ( | order | ) |
Generate trivariate monomials up to given order.
Definition at line 70 of file tetrahedron.py.
Referenced by pick_scheme().
tetrahedron.integrate_approx | ( | f, | |
scheme | |||
) |
Integrate numerically over the reference tetrahedron.
Definition at line 29 of file tetrahedron.py.
Referenced by pick_scheme().
tetrahedron.integrate_exact | ( | f | ) |
Integrate a function over the reference tetrahedron (0,0), (1,0), (0,1).
Definition at line 10 of file tetrahedron.py.
Referenced by pick_scheme().
tetrahedron.is_valid | ( | scheme, | |
tol = 1e-6 , |
|||
relaxed = False |
|||
) |
A scheme is valid if: 1. All its weights sums up to one; 2. All the weights are positive; 3. All its points are inside the reference tetrahedron; 4. No point lie on an face.
Definition at line 84 of file tetrahedron.py.
Referenced by pick_scheme().
tetrahedron.list_schemes | ( | ) |
List all existing schemes for tetrahedra.
Definition at line 42 of file tetrahedron.py.
Referenced by main().
tetrahedron.main | ( | ) |
Definition at line 169 of file tetrahedron.py.
References generate_cpp(), list_schemes(), main(), and pick_scheme().
Referenced by main().
tetrahedron.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 101 of file tetrahedron.py.
References generate_monomials(), integrate_approx(), integrate_exact(), and is_valid().
Referenced by main().