Skip to content

Commit

Permalink
fix 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Jan 25, 2024
1 parent e4d871b commit 003cb1c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linux-macos-windows
name: ci
on:
pull_request:
branches:
Expand All @@ -17,20 +17,20 @@ jobs:
version:
- '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- 'nightly' # currently fails for LinearSolve
- 'nightly'
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -43,14 +43,12 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
- uses: codecov/codecov-action@v3
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
Expand Down
13 changes: 9 additions & 4 deletions src/matrix/sparsematrixcsc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ end
Return boolean vector marking Dirichlet nodes, known by `A[i,i]>=penalty`
"""
function mark_dirichlet(A::SparseMatrixCSC; penalty=1.0e20)
(;colptr,rowval,nzval,n)=A
colptr=A.colptr
rowval=A.rowval
nzval=A.nzval
n=A.n
dirichlet=zeros(Bool,n)
for i=1:n
for j=colptr[i]:colptr[i+1]-1
Expand All @@ -119,7 +122,10 @@ for a node `i` marked as Dirichlet.
Returns A.
"""
function eliminate_dirichlet!(A::SparseMatrixCSC,dirichlet)
(;colptr,rowval,nzval,n)=A
colptr=A.colptr
rowval=A.rowval
nzval=A.nzval
n=A.n
for i=1:n
# set off-diagonal column indiced to zero
if !iszero(dirichlet[i])
Expand Down Expand Up @@ -154,7 +160,6 @@ for a node `i` marked as Dirichlet.
Returns B.
"""
function eliminate_dirichlet(A::SparseMatrixCSC,dirichlet)
(;m,n,colptr,rowval,nzval)=A
B=SparseMatrixCSC(m,n,colptr,rowval,copy(nzval))
B=SparseMatrixCSC(A.m,A.n,A.colptr,A.rowval,copy(A.nzval))
eliminate_dirichlet!(B,dirichlet)
end

2 comments on commit 003cb1c

@j-fu
Copy link
Owner Author

@j-fu j-fu commented on 003cb1c Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/99586

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.4.0 -m "<description of version>" 003cb1c6204f7ae972c2ee1a15bac96df628c4e3
git push origin v1.4.0

Please sign in to comment.