Skip to content

Commit

Permalink
Revamp using new PETSc_jll binaries (#99)
Browse files Browse the repository at this point in the history
* Revamp using PETSc_jll

Very much a WIP, based on https://github.com/gridap/GridapPETSc.jl.

* add CI

* delete deps dir, travis script

* only run tests on pull

* add Mat functionality

* add basic KSP functionality

* try on 1.4

* add more Mat functionality

* support multiple libs

* try initializing before figuring out constants

* add options via keywords

* add keyword options

* add viewer support

* pass kw=true for value-less options

* Laplacian example with GAMG

* add with function for setting options locally

* add lazy initialization, finalizers, atexit hooks

* remove old src files

* add more interfaces

* add printing for Options

* add more printing, conversions

* add MatShell support

* basic docs

Co-authored-by: Thomas Gibson <gibsonthomas1120@hotmail.com>
  • Loading branch information
simonbyrne and thomasgibson committed Sep 1, 2020
1 parent 961bb56 commit aef3fcf
Show file tree
Hide file tree
Showing 39 changed files with 1,000 additions and 70,000 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
- pull_request
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.3'
- '1.4'
- '1.5'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ deps/petsc-*.tar.gz
*.jl.mem
docs/build/
docs/site/
Manifest.toml
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name = "PETSc"
uuid = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0"
authors = ["Simon Byrne <simonbyrne@gmail.com>"]
version = "0.1.0"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
PETSc_jll = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
julia = "1.3"
9 changes: 0 additions & 9 deletions deps/build.jl

This file was deleted.

179 changes: 0 additions & 179 deletions deps/build_petscs.jl

This file was deleted.

64 changes: 0 additions & 64 deletions deps/travis-install-mpi.sh

This file was deleted.

21 changes: 10 additions & 11 deletions src/PETSc.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
module PETSc

import MPI
export PetscInt
using ArrayViews
include(joinpath("generated", "C.jl"))
using .C
include("petsc_com.jl")
using MPI, LinearAlgebra, SparseArrays

using PETSc_jll

include("const.jl")
include("lib.jl")
include("init.jl")
include("viewer.jl")
include("options.jl")
include("is.jl")
include("vec.jl")
include("mat.jl")
include("vec_scatter.jl")
include("pc.jl")
include("matshell.jl")
include("ksp.jl")
include("mapping.jl")
include("ts.jl")

end
Loading

0 comments on commit aef3fcf

Please sign in to comment.