Skip to content

Commit c0e253b

Browse files
Merge branch 'master' of github.com:robbievanleeuwen/section-properties
2 parents 87ff1ac + 484e79a commit c0e253b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,6 @@ jobs:
166166
nox --session=coverage -- xml -i
167167
168168
- name: Upload coverage report
169-
uses: codecov/codecov-action@v3.1.4
169+
uses: codecov/codecov-action@v4.2.0
170+
with:
171+
token: ${{ secrets.CODECOV_TOKEN }}

src/sectionproperties/analysis/solver.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ def solve_cgs(
3838
k: ``N x N`` matrix of the linear system
3939
f: ``N x 1`` right hand side of the linear system
4040
m: Preconditioner for the linear matrix approximating the inverse of ``k``
41-
tol: Tolerance for the solver to achieve. The algorithm terminates when either
42-
the relative or the absolute residual is below ``tol``
41+
tol: Relative tolerance for the solver to achieve.
4342
4443
Returns:
4544
The solution vector to the linear system of equations
4645
4746
Raises:
4847
RuntimeError: If the CGS iterative method does not converge
4948
"""
50-
u, info = linalg.cgs(A=k, b=f, tol=tol, M=m)
49+
u, info = linalg.cgs(A=k, b=f, rtol=tol, M=m)
5150

5251
if info != 0:
5352
raise RuntimeError("CGS iterative method did not converge.")
@@ -67,8 +66,7 @@ def solve_cgs_lagrange(
6766
k_lg: ``(N+1) x (N+1)`` Lagrangian multiplier matrix of the linear system
6867
f: ``N x 1`` right hand side of the linear system
6968
m: Preconditioner for the linear matrix approximating the inverse of ``k``
70-
tol: Tolerance for the solver to achieve. The algorithm terminates when either
71-
the relative or the absolute residual is below ``tol``
69+
tol: Relative tolerance for the solver to achieve.
7270
7371
Returns:
7472
The solution vector to the linear system of equations
@@ -77,7 +75,7 @@ def solve_cgs_lagrange(
7775
RuntimeError: If the CGS iterative method does not converge or the error from
7876
the Lagrangian multiplier method exceeds the tolerance
7977
"""
80-
u, info = linalg.cgs(A=k_lg, b=np.append(f, 0), tol=tol, M=m)
78+
u, info = linalg.cgs(A=k_lg, b=np.append(f, 0), rtol=tol, M=m)
8179

8280
if info != 0:
8381
raise RuntimeError("CGS iterative method did not converge.")

0 commit comments

Comments
 (0)