# Tag Info

Accepted

### PETSc-like library for Julia

Julia is built in such a way that you will never see a full PETSc-like library, and that's on purpose. PETSc is not a single thing: it is an HPC library with some utility functions, linear solvers, ...

### Are there any "light-weight" FEM packages around?

I've been developing a lightweight finite element library in Python 2.7 harnessing the power of NumPy arrays and SciPy sparse matrices. The general idea is that given a mesh and a finite element, you ...
• 2,031

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

As one of the library's authors, I would of course love for deal.II to come out on top with this comparison. But I suspect it may not, and the answer lies in a factor you omit from your comparison: ...
• 52.4k
Accepted

### Efficiency of parallel direct linear solver

Your problem is too small. You have to consider that to get good efficiency, each processor has to have enough work to offset the cost of communication. In other words, there is a threshold how many ...
• 52.4k

### Distributed (MPI) matrix matrix multiplication

You say that you want an MPI version. Then you need to study the literature, as the distributed memory variant of matrix-matrix product are not a simple parallellization of the sequential version. ...
• 1,305
Accepted

### Can Variational Inequalities handle non-symmetric matrices?

It is indeed possible to write an obstacle problem for an advection-diffusion equation as a variational inequality: If $a(u,v)$ is the bilinear form corresponding to your advection-diffusion equation, ...
Accepted

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

Unfortunately there's no tool for this. You can run each on a variety of input sizes to establish the computational complexity they appear to have, i.e. the $f$ in the $O(f(n))$ that characterizes ...
• 10.9k
Accepted

### Choosing hardware to use with PETSc

If you're using iterative methods with assembled matrices, just buy DDR channels. Don't pay attention to number of cores when loooking at the spec sheet. Within the same class of processors (e.g., a ...
• 25.4k

### Are there any "light-weight" FEM packages around?

I think you have some confusion. PETSc is not in the same league as Fenics, Libmesh, Moose etc. In fact, all of these (heavyweight) packages use PETSc for linear algebra. IMHO PETSc is as lightweight ...
• 1,779

### Are there any "light-weight" FEM packages around?

I can recommend nutils. nutils meets at least a few your "light-weight" requirements. it is pure python and easy to install since it only depends on standard Python libraries numpy, scipy, and ...
• 3,398

### Practical reference on sparse linear solvers for PDEs (Navier-Stokes, Poisson) and on learning PETSc

Wow! A question that I can answer! I have been using PETSc for the past year and a half to solve the Navier-Stokes equations (with some hard-coded MPI). The best way to learn PETSc is to (1) read ...
Accepted

### What method to solve a sparse complex symmetric (non-Hermitian) system?

Such problems can be solved using an $LDL^T$ factorization (similar in memory and time cost to Cholesky). Your matrix is not very sparse so treating it as such may have limited benefit. I would ...
• 25.4k
Accepted

### How to solve a linear problem A x = b in PETSC when matrix A has zero diagonal enteries?

Use of Lagrange multipliers produces a saddle-point problem,  \begin{pmatrix} A & B^T \\ B & 0 \end{pmatrix} \begin{pmatrix} u \\ \lambda \end{pmatrix} = \begin{pmatrix} b \\ 0 \end{pmatrix} ...
• 25.4k

### Any recommendations for unit-testing frameworks compatible with code/libraries that use MPI?

The Teuchos Unit test harness in Trilinos natively supports unit tests that use MPI. Things like controlling output from multiple processes and aggregating pass/fail over all processes is automatic. ...

### Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)

Krylov solvers have no problem converging if the system is consistent, i.e., if the right-hand side is in the image of the system matrix $A$; see, e.g., Iterative Krylov Methods for Large Linear ...
• 3,058
Accepted

### Practical reference on sparse linear solvers for PDEs (Navier-Stokes, Poisson) and on learning PETSc

If you're looking for a book and are happy with finite element discretizations, you can check out Elman, Silvester, and Wather, "Finite Elements and Fast Iterative Solvers". If you prefer finite ...
• 25.4k

### PetSc vs Sundials for serial numerical computations?

As mentioned in Geoff Oxberry's more complete answer, it should be noted that PETSc includes TSSUNDIALS, an interface to SUNDIALS. If you configure PETSc with the ...

### PetSc vs Sundials for serial numerical computations?

In general, you can do more with PETSc. SUNDIALS is a collection of ODE solvers (in CVODE, Adams-Bashforth and BDF methods; in ARKODE, ARKIMEX methods) and DAE solvers (IDAS implements a BDF method) ...
• 30.1k
Accepted

### Construct a preconditioner for the linear system $Ax = b$ from a different matrix

Since nobody is stepping up to answer this question, let me point to a paper that contains an example of why one would want to do this: http://www.math.tamu.edu/~bangerth/publications.html#...
• 52.4k
Accepted

### Which iterative method and preconditioner from petsc should be used when solving linear algebra in parallel?

There are many methods for solving linear systems in parallel, but fundamentally what works and what doesn't depends crucially on the properties of the linear system you are trying to solve. Among ...
• 52.4k
Accepted

### Send Petsc sequential matrix to another MPI rank

I don't think PETSc supports it. PETSc really thinks in parallel, so it converts at most between distributed matrices and sequential matrices through submatrix taking operations. I would MatGetArray ...
• 1,305

### Parallel Monte Carlo simulation using PETSc

If you have an idea about how to statically partition your problem into subgroups, you could try partitioning the MPI processes into these subgroups, and then creating an MPI communicator for each ...
• 30.1k

### The alternative to using PETSc's SNES solvers in parallel without using the DMDA methods

There is nothing about SNES that requires DMDA. Create a Vec distributed however you would ...
• 25.4k

### Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)

The problem I imagine you are trying to solve is a diffusion equation with source term with homogeneous Neumann BC. To do so it must be well posed in order to obtain physical and good results. The ...
• 1,618

### How to deal with multi-region problems (in PETSc)

The strategy would really be very similar -- partition your matrix and vectors into "blocks" that correspond to the variables living on the different phases. The difference is really just that the ...
• 52.4k

### Algebraic multigrid in PETSc

AMG can be used with all examples in PETSc. There are three robust implementations that you might want to use -pc_type gamg is a native (smoothed) aggregation ...
• 25.4k
Accepted

### Why does PETSc matrix memory allocation improve performance so much?

Warning: this answer is only going to give a brief overview, for the real details, the one source that won't be wrong is the source code. The core matrix AIJ format is basically the same as the one ...
• 2,199

### Practical reference on sparse linear solvers for PDEs (Navier-Stokes, Poisson) and on learning PETSc

What would be the best starting document for ... b) learning steps by steps? See my project to write an intro book on using PETSc to solve PDEs: https://github.com/bueler/p4pdes An early draft PDF ...

### Which python library for GPU sparse linear system solver library

I have found pycuda particularly useful as wrapper for cuda in python. Especially the section on metaprogramming is useful if you are interested in building more sophisticated frameworks. It's a ...
• 277