Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and houkensjtu committed Apr 4, 2023
1 parent 3a46f4e commit 611d3b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/python/test_taichi_cg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import taichi as ti
import math

import pytest
from taichi.linalg import taichi_cg_solver, LinearOperator
from taichi.linalg import LinearOperator, taichi_cg_solver

import taichi as ti
from tests import test_utils


Expand All @@ -28,7 +30,7 @@ def compute_Ax(v: ti.template(), mv: ti.template()):
r = v[i + 1, j] if i + 1 <= GRID - 1 else 0.0
t = v[i, j + 1] if j + 1 <= GRID - 1 else 0.0
b = v[i, j - 1] if j - 1 >= 0 else 0.0
# Avoid ill-conditioned matrix A
# Avoid ill-conditioned matrix A
mv[i, j] = 20 * v[i, j] - l - r - t - b

@ti.kernel
Expand Down

0 comments on commit 611d3b1

Please sign in to comment.