# Questions tagged [petsc]

PETSc is an open source suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.

10 questions
Filter by
Sorted by
Tagged with
2answers
13k views

### Why is my iterative linear solver not converging?

What can go wrong when using preconditoned Krylov methods from KSP (PETSc's linear solver package) to solve a sparse linear system such as those obtained by discretizing and linearizing partial ...
1answer
4k views

### How can I estimate the condition number of a large sparse matrix using PETSc?

I have a PETSc Mat and would like to estimate its condition number.
1answer
13k views

### Why is Newton's method not converging?

I am using PETSc's nonlinear solver package SNES to solve a system of nonlinear equations obtained by discretizing a partial differential equation. How can I determine why the solver is not converging ...
1answer
362 views

2answers
2k views

### Efficiency of using petsc4py vs. c/c++/fortran

How much slower is petsc4py vs c/c++/fortran? I realize it will depend significantly on the code being executed, but what about something simple like a matrix-vector product?
3answers
2k views

### Sparse linear solver for many right-hand sides

I need to solve the same sparse linear system (300x300 to 1000x1000) with many right hand sides (300 to 1000). In addition to this first problem, I would also like to solve different systems, but with ...
1answer
574 views

### Applying Dirichlet b.c. to the Eigenvalue-Problem

If you use a FEM (on the variational formulation), you can discretize some continuous eigenvalue problem, $$L u = \lambda u \ \ \text{on} \ \Omega,$$ into some discrete, generalized eigenvalue problem,...
2answers
322 views

### Comparing various implementations/software packages for large-scale finite element simulations

I currently use FEniCS and Deal.II to solve various FEM problems. I am also writing my own implementation of these problems by directly implementing the data structures, routines, and solvers within ...
1answer
476 views

### When is MatGetArray/VecGetArray useful?

In petsc, there are already SetValues(Local) methods. But when does one need GetArray methods? A related question: to copy a portion of a Mat/Vec to part of another Mat/Vec, it is usually suggested ...