Skip to main content

taichi.linalg.matrixfree_cg#

class taichi.linalg.matrixfree_cg.LinearOperator(matvec_kernel)#
matvec(self, x, Ax)#
taichi.linalg.matrixfree_cg.MatrixFreeBICGSTAB(A, b, x, tol=1e-06, maxiter=5000, quiet=True)#

Matrix-free biconjugate-gradient stabilized solver (BiCGSTAB).

Use BiCGSTAB method to solve the linear system Ax = b, where A is implicitly represented as a LinearOperator.

Parameters:
  • A (LinearOperator) – The coefficient matrix A of the linear system.

  • b (Field) – The right-hand side of the linear system.

  • x (Field) – The initial guess for the solution.

  • maxiter (int) – Maximum number of iterations.

  • atol – Tolerance(absolute) for convergence.

  • quiet (bool) – Switch to turn on/off iteration log.

taichi.linalg.matrixfree_cg.MatrixFreeCG(A, b, x, tol=1e-06, maxiter=5000, quiet=True)#

Matrix-free conjugate-gradient solver.

Use conjugate-gradient method to solve the linear system Ax = b, where A is implicitly represented as a LinearOperator.

Parameters:
  • A (LinearOperator) – The coefficient matrix A of the linear system.

  • b (Field) – The right-hand side of the linear system.

  • x (Field) – The initial guess for the solution.

  • maxiter (int) – Maximum number of iterations.

  • atol – Tolerance(absolute) for convergence.

  • quiet (bool) – Switch to turn on/off iteration log.