gjquad_cli Namespace Reference

Functions

def main (n, alpha, beta, meth)
 

Variables

 parser
 
 type
 
 int
 
 default
 
 help
 
 float
 
 choices
 
 args = parser.parse_args()
 

Function Documentation

◆ main()

def gjquad_cli.main (   n,
  alpha,
  beta,
  meth 
)

Definition at line 36 of file gjquad_cli.py.

36 def main(n, alpha, beta, meth):
37  if meth == "rec":
38  roots, weights = gjquadpy.gaussjacobiquadccompat.gauss_jacobi_rec_c(
39  n, alpha, beta
40  )
41  elif meth == "gw":
42  roots, weights = gjquadpy.gaussjacobiquadccompat.gauss_jacobi_gw_c(
43  n, alpha, beta
44  )
45  elif meth == "algo665":
46  roots, weights = gjquadpy.gaussjacobiquadccompat.gauss_jacobi_algo665_c(
47  n, alpha, beta
48  )
49  # print(f"method: {meth}, npts: {n}, alpha: {alpha}, beta: {beta}, range: [-1, 1]")
50  for idx, root in enumerate(roots):
51  sign = " " if root >= 0 else ""
52  root_str = f"{root:23.17E}"
53  weight_str = f"{weights[idx]:23.17E}"
54  print(f"Root:{sign} {root_str} Weight: {weight_str}")
55 
56 
int main(int argc, char *argv[])
Definition: c_cli_gjpq.c:24

Variable Documentation

◆ args

gjquad_cli.args = parser.parse_args()

Definition at line 72 of file gjquad_cli.py.

◆ choices

gjquad_cli.choices

Definition at line 69 of file gjquad_cli.py.

◆ default

gjquad_cli.default

Definition at line 61 of file gjquad_cli.py.

◆ float

gjquad_cli.float

Definition at line 62 of file gjquad_cli.py.

◆ help

gjquad_cli.help

Definition at line 61 of file gjquad_cli.py.

◆ int

gjquad_cli.int

Definition at line 61 of file gjquad_cli.py.

◆ parser

gjquad_cli.parser
Initial value:
1 = argparse.ArgumentParser(
2  description="Compute Gauss-Jacobi quadrature via GaussJacobiQuad."
3  )

Definition at line 58 of file gjquad_cli.py.

◆ type

gjquad_cli.type

Definition at line 61 of file gjquad_cli.py.