gridap / gridap/GridapPETSc.jl

Improving PETSc SNES support

Open
#45 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
33
Forks
14
PR merge metrics
No merged PRs in 30d

Description

At present the current implementation of PETScNonLinearSolver is not fully optimized. These are the main problems.

* [ ] Residuals and jacobians are copied back and forth from PArrays to PETSc objects, and vice-versa. I guess that this can be overcomed by directly assembling into PETSc data structures (as we did in GridapDistributed.jl 0.1.0). I would consider this in a future PR if and only if we determine that it becomes a bottleneck/hot spot.
* [x] The jacobian copy overhead is even more severe because the local storage format of PSparseMatrix by default is not SparseMatrixCSR{0,PetscInt,PetscReal} but SparseMatrixCSC, so that we need a conversion at each Jacobian calculation. I guess this latter issue can be easily overcomed. https://github.com/gridap/GridapPETSc.jl/pull/66/
* [ ] The PETScNonLinearSolverCache does not currently store a reference to the KSP/PC objects used for the previous nonlinear solve. I guess it would be convenient to have this in the future. (We can put it an issue).

Besides,
* Partitioned simulations in sequential mode currently trigger a @notimplemented macro. I did not have enough strength to fully implement this case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.