Most Popular
1500 questions
33
votes
4 answers
Why is local conservation important when solving PDEs?
Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs.
What can go wrong when using a method that is not locally conservative?
Okay, so…
Jed Brown
- 25,650
- 3
- 72
- 130
33
votes
5 answers
Performance differences between ATLAS and MKL?
ATLAS is a free BLAS/LAPACK replacement that tunes itself to the machine when compiled. MKL is the commercial library shipped by Intel. Are these two libraries comparable when it comes to performance, or does MKL have the upper hand for some tasks?…
Stefano Borini
- 1,599
- 3
- 16
- 20
33
votes
2 answers
Define custom probability density function in Python
Is there a way, using some established Python package (e.g. SciPy) to define my own probability density function (without any prior data, just $f(x) = a x + b$), so I can then make calculations with it (such as obtaining the variance of the…
astrojuanlu
- 1,187
- 2
- 12
- 25
33
votes
9 answers
Modern resources for learning FEM
I need to get started using Finite Element Methods. I am about to start reading Numerical solutions of partial differential equations by the finite element method by Claes Johnson, but it's dated 1987.
Two questions:
1) What newer good…
a06e
- 1,729
- 15
- 22
32
votes
4 answers
What tools or approaches are available to speed up code written in Python?
Background: I think I might want to port some code that calculates matrix exponential-vector products using a Krylov subspace method from MATLAB to Python. (Specifically, Jitse Niesen's expmvp function, which uses an algorithm described in this…
Geoff Oxberry
- 30,394
- 9
- 64
- 127
31
votes
3 answers
What is the relationship of BLAS, LAPACK, and other linear algebra libraries?
I have been looking into C++ linear algebra libraries for a project I've been working on. Something that I still don't have any grasp on is the connection of BLAS and LAPACK to other linear algebra libraries.
Looking through this article on linear…
Neal Kruis
- 469
- 4
- 9
31
votes
5 answers
Permute a matrix in-place in numpy
I want to modify a dense square transition matrix in-place by changing the order of several of its rows and columns, using python's numpy library. Mathematically this corresponds to pre-multiplying the matrix by the permutation matrix P and…
none
- 508
- 1
- 5
- 7
31
votes
7 answers
Alternatives to Journal of Computational Physics
The Journal of Computational Physics has been an important outlet for computational science in the past, and I have published there before. For the benefit of those (like me) who have signed the Elsevier boycott, what non-Elsevier journals would be…
David Ketcheson
- 16,522
- 4
- 54
- 105
31
votes
10 answers
Compressing floating point data
Are there any tools specifically designed for compressing floating point scientific data?
If a function is smooth, there's obviously a lot of correlation between the numbers representing that function, so the data should compress well. …
Szabolcs
- 2,620
- 2
- 19
- 34
31
votes
8 answers
Scientific workflow management system
Can anyone recommend me a good workflow management system (WMS), preferably in Python? So far I have been using GNU Make, but it introduces a layer of complexity that I want to avoid. A good WMS should have the following features:
integrate easily…
btel
- 413
- 3
- 6
30
votes
11 answers
Robust algorithm for $2 \times 2$ SVD
What is a simple algorithm for computing the SVD of $2 \times 2$ matrices?
Ideally, I'd like a numerically robust algorithm, but I'll like to see both simple and not-so-simple implementations. C code accepted.
Any references to papers or code?
lhf
- 966
- 1
- 7
- 12
30
votes
5 answers
What features do users need from an MPI C++ interface?
The 3.0 version of the MPI standard formally deleted the C++ interface (it was previously deprecated). While implementations may still support it, features that are new in MPI-3 do not have a C++ interface defined in the MPI standard. See…
Jeff Hammond
- 2,116
- 16
- 22
30
votes
2 answers
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 term?
I am interesting in solving the…
boyfarrell
- 5,409
- 3
- 35
- 67
30
votes
2 answers
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 differential equations?
What steps can I take to…
Jed Brown
- 25,650
- 3
- 72
- 130
30
votes
6 answers
How can I numerically differentiate an unevenly sampled function?
Standard finite difference formulas are usable to numerically compute a derivative under the expectation that you have function values $f(x_k)$ at evenly spaced points, so that $h \equiv x_{k+1} - x_k$ is a constant. What if I have unevenly spaced…
David Z
- 3,383
- 2
- 27
- 34