# All Questions

775 questions
Filter by
Sorted by
Tagged with
7k views

### What guidelines should I follow when choosing a sparse linear system solver?

Sparse linear systems turn up with increasing frequency in applications. One has a lot of routines to choose from for solving these systems. At the highest level, there is a watershed between direct (...
12k views

### What are some good strategies for improving the serial performance of my code?

I work in computational science, and as a result, I spend a non-trivial amount of my time trying to increase the scientific throughput of many codes, as well as understanding the efficiency of these ...
122k views

### Recommendations for a usable, fast C++ matrix library?

Does anyone have recommendations on a usable, fast C++ matrix library? What I mean by usable is the following: Matrix objects have an intuitive interface (ex.: I can use rows and columns while ...
2k views

784 views

### What is a scalable preconditioner for high-frequency Helmholtz?

Standard multigrid and domain decomposition methods do not work, but I have large 3D problems and direct solvers are not an option. What methods should I try? How are my choices affected by the ...
4k views

### How to properly apply non-homogeneous Dirichlet boundary conditions with FEM?

In general, Dirichlet boundary conditions won't be satisfied exactly for FEM for non-homogeneous boundary conditions. The FEM codes I've seen set the degrees of freedom to interpolate the Dirichlet ...
5k views

### Poisson equation finite-difference with pure Neumann boundary conditions

I'm trying to solve a 1D Poisson equation with pure Neumann boundary conditions. I've found many discussions of this problem, e.g. 1) Poisson equation with Neumann boundary conditions 2) Writing the ...
467 views

### What heuristics can be used to minimize the asymptotic matrix bandwidth of a 5-point Laplacian discretization?

I can see that there are multiple heuristics to achieve a matrix with minimum bandwidth. As heuristics, they can't guarantee an optimal solution in polynomial time (after all, the problem is NP-...
9k views

### Is it worthwhile to write unit tests for scientific research codes?

I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've ...
8k views

### What are criteria to choose between finite-differences and finite-elements

I am used to thinking of finite-differences as a special case of finite-elements, on a very constrained grid. So what are the conditions on how to choose between Finite Difference Method (FDM) and ...
5k views

### Is Crank-Nicolson a stable discretization scheme for Reaction-Diffusion-Advection (convection) equation?

I am not very familiar with the common discretization schemes for PDEs. I know that Crank-Nicolson is popular scheme for discretizing the diffusion equation. Is also a good choice for the advection ...
3k views

### What is the principle behind the convergence of Krylov subspace methods for solving linear systems of equations?

As I understand it, there are two major categories of iterative methods for solving linear systems of equations: Stationary Methods (Jacobi, Gauss-Seidel, SOR, Multigrid) Krylov Subspace methods (...
9k views

### Libraries for solving sparse linear systems

There are a number of different libraries out there that solve a sparse linear system of equations, however I'm finding it difficult to figure out what the differences are. As far as I can tell there ...
13k views

### How to start using LAPACK in c++?

I'm new to computational science and I already have learned basic methods for integration, interpolation, methods like RK4, Numerov etc on c++ but recently my professor asked me to learn how to use ...