![]() |
Peano
|
Static Public Member Functions | |
matrixTranspose (M) | |
Transpose a matrix M. | |
matrixDot (A, B) | |
A dot B. | |
matrixInverse (M) | |
M^-1. | |
matrixInverse_Pivot (M) | |
Compute a matrix inverse using a pivot algorithm. | |
vectorPad (v, padSize) | |
zero-pad a vector | |
matrixPadAndFlatten_RowMajor (M, padSize) | |
a b c d e f => a b c 0 d e f 0 | |
matrixPadAndFlatten_ColMajor (M, padSize) | |
a b c d e f => a d 0 b e 0 c f 0 | |
getGaussLegendre (nDof) | |
Return Gauss-Legendre weights, points. | |
getGaussLobatto (nDof) | |
Return Gauss-Lobatto weights, points. | |
baseFunc1d (xi, xin, N) | |
Computes the ADER-DG basis functions and their first derivative. | |
assembleStiffnessMatrix (xGPN, wGPN, N) | |
Computes the (reference) element stiffness matrix for an approximation of order N. | |
assembleK1 (Kxi, xGPN, N) | |
Computes the difference between the reference element mass operator evaluated at point xi=1.0 and the element stiffness matrix. | |
assembleMassMatrix (xGPN, wGPN, N) | |
Computes the (reference) element mass matrix for an approximation of order N. | |
assembleDiscreteDerivativeOperator (MM, Kxi) | |
Computes some derivative values for debugging purposes. | |
assembleFineGridProjector1d (xGPN, j, N) | |
Transforms the degrees of freedom located on a coarse grid edge nodes to degrees of freedoms located on nodes of a fine grid edge. | |
LagrangBasisPoly (x, order, i, xi=None) | |
Returns the i-th Lagrange basis polynomial as symbolic expression. | |
assembleBasisFunction (quadNodes) | |
assembleQuadratureConversion (fromQ, toQ, N) | |
Return base conversion matrix. | |
assembleDGToFV (nodes, weights, N, Nlim) | |
Return conversion matrix from DG grid to FV grid. | |
assembleFVToDG (dg2fv, weights, N, Nlim) | |
Return conversion matrix from FV grid to DG grid. | |
Definition at line 9 of file MathUtils.py.
|
static |
Definition at line 1032 of file MathUtils.py.
|
static |
Return conversion matrix from DG grid to FV grid.
Definition at line 1075 of file MathUtils.py.
|
static |
Computes some derivative values for debugging purposes.
Args: MM: The (reference) element mass matrix for a approximation of order N. Kxi: The (reference) element stiffness matrix for a approximation of order N.
Returns: dudx: Derivative values for debugging purposes.
Definition at line 950 of file MathUtils.py.
|
static |
Transforms the degrees of freedom located on a coarse grid edge nodes to degrees of freedoms located on nodes of a fine grid edge.
The difference in levels is 1.
Let us denote by P the 1d fine grid projector (=1d equidistantGridProjector). The fine grid DoF are computed according to:
u^{fine;j}_i = sum_{m} P^{j}_im u^{coarse}_m
Args: xGPN: Gauss-Legendre nodes (N nodes). j: Index of one the three subintervals: 0,1, or 2. N: Number of nodal basis functions (=order+1). Returns: equidistantGridProjector: The corresponding degrees of freedom located at nodes of an equidistant grid over (0,1).
Definition at line 972 of file MathUtils.py.
|
static |
Return conversion matrix from FV grid to DG grid.
Definition at line 1091 of file MathUtils.py.
|
static |
Computes the difference between the reference element mass operator evaluated at point xi=1.0 and the element stiffness matrix.
Args: K_xi: The (reference) element stiffness matrix for a approximation of order N. xGPN: Gauss-Legendre nodes (N nodes). N: Order of approximation corresponding to N+1 nodal basis functions. Returns: K1: <unknown>
Definition at line 895 of file MathUtils.py.
|
static |
Computes the (reference) element mass matrix for an approximation of order N.
Args: xGPN: Gauss-Legendre nodes (N nodes). wGPN: N Gauss-Legendre weights (N weights). N: Number of nodal basis functions (=order+1). Returns: M_xi: The (reference) element mass matrix.
Definition at line 922 of file MathUtils.py.
|
static |
Return base conversion matrix.
Definition at line 1065 of file MathUtils.py.
|
static |
Computes the (reference) element stiffness matrix for an approximation of order N.
Args: xGPN: Gauss-Legendre nodes (N nodes). wGPN: Gauss-Legendre weights (N weights). N: Number of nodal basis functions (=order+1). Returns: K_xi: The (reference) element stiffness matrix.
Definition at line 867 of file MathUtils.py.
|
static |
Computes the ADER-DG basis functions and their first derivative.
Args: xi: The reference element point the basis functions are evaluated at. Here, xi refers to the greek letter that is often used as a reference element coordinate. xin: The reference element nodes corresponding to the nodal basis functions. N: Number of nodal basis functions (=order+1). Returns: phi: Basis function values. phi_xi: First derivatives of the basis functions.
Definition at line 828 of file MathUtils.py.
|
static |
Return Gauss-Legendre weights, points.
Definition at line 115 of file MathUtils.py.
|
static |
Return Gauss-Lobatto weights, points.
Definition at line 475 of file MathUtils.py.
|
static |
Returns the i-th Lagrange basis polynomial as symbolic expression.
Algorithm was obtained from https://wanglongqi.github.io/python/2014/03/24/implement-of-lagrange-polynomial/.
x: symbolic variable Symbolic variable. order : number Order of the Lagrange basis polynomial. xi : number The node the basis polynomial should pass through i : number The node we are interested in.
Li: symbolic expression The i-th Lagrange basis polynomial as symbolic expression.
Definition at line 1003 of file MathUtils.py.
|
static |
A dot B.
Definition at line 22 of file MathUtils.py.
|
static |
M^-1.
Definition at line 30 of file MathUtils.py.
|
static |
Compute a matrix inverse using a pivot algorithm.
Definition at line 35 of file MathUtils.py.
|
static |
a b c d e f => a d 0 b e 0 c f 0
Definition at line 99 of file MathUtils.py.
|
static |
a b c d e f => a b c 0 d e f 0
Definition at line 87 of file MathUtils.py.
|
static |
Transpose a matrix M.
Definition at line 17 of file MathUtils.py.
|
static |
zero-pad a vector
Definition at line 80 of file MathUtils.py.