pg_utils.numerics.matrices.quad_matrix_sympy

pg_utils.numerics.matrices.quad_matrix_sympy(operand_A: Expr, operand_B: Expr, nrange_A: List[int], nrange_B: List[int], xi_quad: List[Union[float, Number]], wt_quad: List[Union[float, Number]], n_dps: int = 16) MutableDenseMatrix[source]

Compute quadrature matrix using sympy, where \(w_k\) is wt_quad[k], \(\xi_k\) is xi_quad[k], \(f_A\) is operand_A and \(f_B\) is operand_B.

Parameters:
  • operand_A (sympy.Expr) – operand A

  • operand_B (sympy.Expr) – operand B

  • nrange_A (List[int]) – range of degrees where operand A is evaluated

  • nrange_B (List[int]) – range of degrees where operand B is evaluated

  • xi_quad (List[Union[float, sympy.Number]]) – x coordinates where the operands are evaluated

  • wt_quad (List[Union[float, sympy.Number]]) – weights for summation

  • dps (int) – number of decimal places to which the calculation will be performed

Returns:

calculated matrix in sympy.Matrix

Warning

There is a known issue that not all functions can be numerically evaluated in sympy. For details, see Ingredients document. Therefore, other quad_matrix functions should be used in favour of sympy version.