Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding DMStag functions as well as testing and documentation #119

Merged
merged 137 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
542af50
Adding examples that show how to use SNES with the PETSc AIJ interface.
boriskaus May 3, 2021
5f9638f
Adding trial function (incomplete)
nicoberlie May 3, 2021
77006ba
Testing on function DMStagCreate1d
nicoberlie May 3, 2021
5148019
added DMStagCreate1d and DMStagGetGlobalSizes
boriskaus May 3, 2021
6c3c205
* fixed viewers for DMSTAG and SNES
boriskaus May 3, 2021
25854eb
- added a new field on the DMSTAG struct to indicate the # of dimensions
boriskaus May 4, 2021
f86c980
added broadcasting from sparse to MatSeqAIJ, which simplifies the exa…
boriskaus May 4, 2021
31ef5a7
added a few new routines & fixed the DMGetDimension one
boriskaus May 4, 2021
2cd37fb
added change to DMSTAG, to allow for keyword arguments
boriskaus May 4, 2021
8ad1b44
is a keyword is false it is no longer added to the options database (…
boriskaus May 4, 2021
a7016af
added DMStageCreate2d
nicoberlie May 4, 2021
deb1b56
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 4, 2021
a48fe66
- fixed a bug in DMSetup
boriskaus May 4, 2021
f9dc40b
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 4, 2021
6007048
DMStagCreate2D added and adapted
nicoberlie May 4, 2021
27c1a29
DMStagCreate3d added (+correction description 2d))
nicoberlie May 4, 2021
c3aa96b
DMStagCreateCompatibleDMStag added
nicoberlie May 4, 2021
afa88c4
DMStagGetDOF added
nicoberlie May 4, 2021
ca4d978
Correction output DOF (taking dim into account)
nicoberlie May 4, 2021
c84944e
added DMCreateGlobalVector routine & stencil location functions
boriskaus May 4, 2021
a1cc037
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 4, 2021
558f0f4
WIP on creating local vectors from the DMSTAG and extracting an array…
boriskaus May 5, 2021
f58bca0
few more comments
boriskaus May 5, 2021
9f49d17
Update some comments
nicoberlie May 5, 2021
11a50ab
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 5, 2021
1a50a26
added convenience routines such that we can set and show vector value…
boriskaus May 5, 2021
46edcf4
retrieving array from DMStag appears to work now
boriskaus May 5, 2021
791d310
DMStagVecSetValuesStencil added (work in progress))
nicoberlie May 5, 2021
4507bb2
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 5, 2021
4d87b0d
work in progress DMStagVecSetValuesStencil
nicoberlie May 5, 2021
355d21f
- fixes issue in DMStagVecGetArray: array is ordered in a different d…
boriskaus May 5, 2021
0e6e5ef
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 5, 2021
d9e2637
added DMLocalToGlobal
boriskaus May 6, 2021
61f44c8
* cleaned up tests a bit
boriskaus May 6, 2021
f56ed53
added DMCreateMatrix
boriskaus May 6, 2021
7ed43c7
Diffusion2D code (work in progress)
nicoberlie May 6, 2021
35486d1
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 6, 2021
a455644
inspect values of a PETSc matrix in a julia manner, by typing A[1:2,3]
boriskaus May 6, 2021
91759de
give a message if the matrix is not yet assembled, rather than throwi…
boriskaus May 6, 2021
3f03ffe
added DMStagMatSetValueStencil/DMStagMatGetValueStencil and test
boriskaus May 6, 2021
741fee1
Starting dmstag ex1 (work in progress)
nicoberlie May 6, 2021
e990888
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 6, 2021
546170b
added a few more routines and more tests. WIP to test setting local v…
boriskaus May 6, 2021
6fa65c7
now we can do size(dm_3D), to check the (global) size of a DMStag object
boriskaus May 6, 2021
316b41c
Merge branch 'feature-SNESexamples' into feature-DMSTAG
boriskaus May 7, 2021
24e4426
Adding coordinates explicit + dmcoordinate + vector and array
nicoberlie May 7, 2021
f4b5b92
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 7, 2021
52173c2
- extracting arrays from DMStag objects
boriskaus May 7, 2021
1dfbd70
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 7, 2021
5b36646
update ex1 (work in progress) + int out of getcorner in 1D
nicoberlie May 10, 2021
4e34e2d
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 10, 2021
f960489
- added an option to SNES, which allows passing PETSc vectors to the …
boriskaus May 10, 2021
676f08b
changed the behavior of DMStagGetArray, which now always returns ghos…
boriskaus May 10, 2021
0aa33d7
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 10, 2021
40bb0e8
bugfix
boriskaus May 10, 2021
47d16e6
ex1 starting anomaly
nicoberlie May 10, 2021
db24d41
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 10, 2021
47c2c40
added DMLocalToGlobal and friend for the case that the inputs are poi…
boriskaus May 10, 2021
a8037ab
Progresses on ex1.jl
nicoberlie May 10, 2021
0eaef47
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 10, 2021
8221629
- added example of how DMSTAG can be combined with automatic differen…
boriskaus May 10, 2021
03f8b8d
slight simplification
boriskaus May 10, 2021
29eaa02
added a 1D example that shows how to use DMStag in combination with a…
boriskaus May 11, 2021
0b02fb0
ex1.jl equivalent to the dmstag ex1.c
nicoberlie May 11, 2021
1a09e25
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 11, 2021
f90618d
Stokes 2D (work in progress)
nicoberlie May 12, 2021
463c7ec
DM_BOUNDARY_GHOSTED now works with automatic differentiation to obtai…
boriskaus May 12, 2021
6c6127e
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 12, 2021
5ca6915
added 2D test that employs ghost points to set flux free lateral BC's
boriskaus May 12, 2021
bf0d007
clarified setting lateral BC's
boriskaus May 13, 2021
0f4db17
signficant speedup by utilizing the sparsity pattern of the jacobian
boriskaus May 17, 2021
468df97
Update stokes code (work in progress) + correction test
nicoberlie May 18, 2021
3f7d3d2
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 18, 2021
5cb6dd6
Functions Populate coefficient data and GetPhase completed
nicoberlie May 18, 2021
6dcf7ba
bugfix for 1D and added 2D porosity wave example
boriskaus May 18, 2021
a4179c6
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus May 18, 2021
e32b68c
The 2D code was slow for larger resolutions, predominantly because of…
boriskaus May 19, 2021
d867001
Compute Stresses and ComputeStrainRates done
nicoberlie May 24, 2021
90ecc99
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie May 24, 2021
d942c93
Residual function done
nicoberlie May 24, 2021
5311b83
Fix multi-lign Julia specific bug
nicoberlie May 25, 2021
9ee291a
Progress on Jacobian Stokes (AD)
nicoberlie Jun 10, 2021
ca48692
Stokes Solved without Snes
nicoberlie Jun 14, 2021
c6b7901
Stokes solved with SNES
nicoberlie Jun 15, 2021
44db8e2
Cleaned up example
nicoberlie Jun 16, 2021
dfdb5cc
Improve documentation dmstag.jl
nicoberlie Jun 21, 2021
c25734e
Corrected but (cant compile with $ sign in doc)
nicoberlie Jun 21, 2021
a4509e3
Corrected documentation (cant compile with $ sign)
nicoberlie Jun 21, 2021
6ae74d2
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie Jun 21, 2021
9646332
Plots reorganize
nicoberlie Jun 21, 2021
b667a79
Improvement plots stokes example
nicoberlie Jun 22, 2021
8988e65
Documentation + testing completed + loops in get & set values functions
nicoberlie Jun 25, 2021
65ac962
Documentation precision
nicoberlie Jun 25, 2021
0fb9115
added Test dependencies
boriskaus Jun 30, 2021
5e49691
updated docs for dmstag
boriskaus Jun 30, 2021
e61a6f4
Some changes to make DMStag compatible with the latest version of PET…
boriskaus Jul 1, 2021
3ce2ce7
bugfix
boriskaus Jul 1, 2021
b22c47b
Merge remote-tracking branch 'origin/master' into feature-DMSTAG
nicoberlie Jul 5, 2021
2053fde
Merge branch 'master' into feature-DMSTAG
Jul 7, 2021
875aaeb
Update src/snes.jl
boriskaus Jul 7, 2021
97f4c68
fixed snes; removed Project.toml from /test
boriskaus Jul 8, 2021
bf48b27
belongs to previous
boriskaus Jul 8, 2021
3828913
Merge branch 'master' into feature-DMSTAG
boriskaus Jul 8, 2021
2b42030
make test work after merging latest changes
boriskaus Jul 8, 2021
b33482c
Merge commit '30e66665e4f65f42c22d953b96ab1fb234d08fb8' into feature-…
boriskaus Jul 8, 2021
8f4b6e8
updated docs
boriskaus Jul 8, 2021
ed4d1c0
added Documenter as dependency
boriskaus Jul 8, 2021
0522442
commit to solve git issue
nicoberlie Jul 8, 2021
739bc33
Merge remote-tracking branch 'origin/feature-DMSTAG' into feature-DMSTAG
nicoberlie Jul 8, 2021
6aa45d3
removed loop @for_petsc to reset it before each function
nicoberlie Jul 8, 2021
8cf0b96
Adding missing @chk s
nicoberlie Jul 8, 2021
c66e50a
changed Int64 to PetscInt in DMStag struct
nicoberlie Jul 8, 2021
c8c98e0
Corrected typo (for_petsc instead of for_libpetsc))
nicoberlie Jul 8, 2021
af667fb
Fix dependency on SparseArrays
Jul 8, 2021
322fdf4
Revert "Corrected typo (for_petsc instead of for_libpetsc))"
Jul 8, 2021
fdb3e47
Clean up + links Petsc Manual in doc
nicoberlie Jul 8, 2021
b038dd7
Little git mismanipulation, back again to for_libpetsc
nicoberlie Jul 8, 2021
e4968e0
Merge commit 'f3eef64667e7f969bd72880e66960f87a9732aed' into feature-…
boriskaus Jul 8, 2021
6b7d9e3
Merge branch 'feature-DMSTAG' of https://github.com/boriskaus/PETSc.j…
boriskaus Jul 8, 2021
f7ca7e8
Merge remote-tracking branch 'origin/master' into feature-DMSTAG
nicoberlie Jul 9, 2021
3142827
Merge remote-tracking branch 'origin/master' into feature-DMSTAG
nicoberlie Jul 20, 2021
e77f4e0
Adapting dmstag + matrix structure (work in progress)
nicoberlie Jul 23, 2021
1aede0b
Repaired test dmstag
nicoberlie Jul 26, 2021
a54e0e2
Adapted old_test to make them work
nicoberlie Jul 26, 2021
c250257
Corrected examples to make them work
nicoberlie Jul 27, 2021
e310bf1
Simplify DMSTAGSTENCIL structure
nicoberlie Jul 28, 2021
3a9d6b9
Added loop over petsc libraries (bit broken but i don't unerstand how)
nicoberlie Jul 28, 2021
2c9faa8
Loop over the libraries for all tests, still memory issues
nicoberlie Jul 29, 2021
1a94a3d
petsc finalize forgotten
nicoberlie Jul 29, 2021
7e6580f
Temporary fix, having several testset seems to mess up the AD
nicoberlie Jul 30, 2021
19e0d38
Adding other libraries (and new troubles)
nicoberlie Jul 30, 2021
6f0ba3f
Merge branch 'visco-elasto-plastic_Stokes' into feature-DMSTAG
nicoberlie Jul 30, 2021
bc3d0a5
WIP: making DMStag tests work with multiple libraries and adjusting i…
boriskaus Aug 1, 2021
667aba2
WIP: Many routines within dmstag.jl were duplicates of routines that …
boriskaus Aug 2, 2021
314b1d5
WIP: added 2D/3D & coordinate tests
boriskaus Aug 2, 2021
4bf568a
finalized the tests with DMSTAG. running actual code also requires de…
boriskaus Aug 3, 2021
00cc2f3
ex1 works
boriskaus Aug 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name = "PETSc"
uuid = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0"
authors = ["Simon Byrne <simonbyrne@gmail.com>"]
version = "0.1.0"
version = "0.1.2"

[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"

[extras]
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

[targets]
test = ["ForwardDiff", "UnicodePlots", "Printf"]
test = ["ForwardDiff", "UnicodePlots", "Test", "Plots", "SparseDiffTools", "Printf"]
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
[![doc dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaparallel.github.io/PETSc.jl/dev/)


This package provides a low level interface for
[PETSc](https://www.mcs.anl.gov/petsc/)
This package provides a low level interface for [PETSc](https://www.mcs.anl.gov/petsc/) and allows combining julia features (such as automatic differentiation) with the PETSc infrastructure and nonlinear solvers.

## Installation

Expand Down Expand Up @@ -46,4 +45,4 @@ To see the currently set library use
```julia
using PETSc
PETSc.libs
```
```
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ makedocs(;
"Getting Started" => "man/getting_started.md",
"PETSc" => Any[
"Mat" => "man/mat.md",
"DMStag" => "man/dmstag.md",
],
"List of functions" => "man/listfunctions.md"
],
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PETSc.jl

[PETSc.jl](https://github.com/JuliaParallel/PETSc.jl) is a Julia wrapper for the Portable, Extensible Toolkit for Scientific Computation [PETSc](https://petsc.org/release/documentation/manual/) package, which allows solving ordinary and partial differential equations in parallel on laptops or massively parallel high-performance systems.
[PETSc.jl](https://github.com/JuliaParallel/PETSc.jl) is a Julia wrapper for the Portable, Extensible Toolkit for Scientific Computation [PETSc](https://petsc.org/release/documentation/manual/) package, which allows solving ordinary and partial differential equations in parallel on laptops or massively parallel high-performance systems.

The use of Julia greatly simplifies the code that developers have to write, while allowing to employ Julia features such as automatic differentiation. The Julia wrapper also comes with a pre-build library, which greatly simplifies the process of getting your first code working in parallel, on different operating systems. In many cases, the Julia code is significantly shorter than its C counterpart.
The use of Julia greatly simplifies the code that developers have to write, while allowing to employ Julia features such as automatic differentiation. The Julia wrapper also comes with a pre-build library, which greatly simplifies the process of getting your first code working in parallel, on different operating systems. In many cases, the Julia code is significantly shorter than its C counterpart.

This wrapper mimics the PETSc-functionality as closely as possible, but remains work in progress (meaning that not everything has been translated yet). See the official [user guide](https://petsc.org/release/overview/) if you want to learn more about PETSc in general. For Julia-specific examples, have a look at our [examples](https://github.com/JuliaParallel/PETSc.jl/tree/master/examples) or [tests](https://github.com/JuliaParallel/PETSc.jl/tree/master/test).
This wrapper mimics the PETSc-functionality as closely as possible, but remains work in progress (meaning that not everything has been translated yet). See the official [user guide](https://petsc.org/release/overview/) if you want to learn more about PETSc in general. For Julia-specific examples, have a look at our [examples](https://github.com/JuliaParallel/PETSc.jl/tree/master/examples) or [tests](https://github.com/JuliaParallel/PETSc.jl/tree/master/test).
8 changes: 8 additions & 0 deletions docs/src/man/dmstag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# DMStag

The following `DMStag` routines are available:

```@autodocs
Modules = [PETSc]
Pages = ["dmstag.jl"]
```
Loading