WARPXM v1.10.0
Loading...
Searching...
No Matches
simplex_basis Namespace Reference

Classes

class  Basis
 
class  LineBasisTest
 
class  QuadratureRule
 

Functions

def make_vandermonde (modes, nodes, sym)
 
def lgl_points_1d_on_01 (N)
 
def lgl_quad_rule_1d_01 (N)
 
def gauss_legendre_quad_rule_1d (N)
 
def coefs_of_polynomial (poly, degree)
 We're going to compute the coefficients of the polynomial, which is just an opaque lambda function to us, in the monomial basis, so that we can pass them to mp.polyroots.
 
def mp_to_np (matrix)
 
def np_to_mp (array)
 
def lgl_simplex_nodes (dims, degree)
 

Variables

 exit
 
 dps
 
TriangleBasis b = TriangleBasis(3)
 
TriangleBasis ells = b.lagrange_interpolating_polynomials()
 

Function Documentation

◆ coefs_of_polynomial()

def simplex_basis.coefs_of_polynomial (   poly,
  degree 
)

We're going to compute the coefficients of the polynomial, which is just an opaque lambda function to us, in the monomial basis, so that we can pass them to mp.polyroots.

To do so, we use the relation

 p'.(x) = V * c,        (**)

where

  • p'.(x) is the vector of evaluations of p' at some vector of points x,
  • V is the Vandermonde matrix of monomials evaluated at x,
  • c is the vector of monomial coefficients of p'.

To find c, we just have to solve the equation (**).

It doesn't matter what vector of point we choose for x as long as it results in a well-conditioned matrix V. We choose the Chebyshev nodes.

◆ gauss_legendre_quad_rule_1d()

def simplex_basis.gauss_legendre_quad_rule_1d (   N)

◆ lgl_points_1d_on_01()

def simplex_basis.lgl_points_1d_on_01 (   N)

◆ lgl_quad_rule_1d_01()

def simplex_basis.lgl_quad_rule_1d_01 (   N)

◆ lgl_simplex_nodes()

def simplex_basis.lgl_simplex_nodes (   dims,
  degree 
)

◆ make_vandermonde()

def simplex_basis.make_vandermonde (   modes,
  nodes,
  sym 
)
Parameters
symthe symbol indicating which family of polynomials to use: p – the "primary" polynomials of this set of modes dpdr – their derivatives with respect to r dpds – their derivatives with respect to s

◆ mp_to_np()

def simplex_basis.mp_to_np (   matrix)

◆ np_to_mp()

def simplex_basis.np_to_mp (   array)

Variable Documentation

◆ b

TriangleBasis simplex_basis.b = TriangleBasis(3)

◆ dps

simplex_basis.dps

◆ ells

TriangleBasis simplex_basis.ells = b.lagrange_interpolating_polynomials()

◆ exit

simplex_basis.exit