All Questions

9,435 questions
Filter by
Sorted by
Tagged with
22k views

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 ...
8k views

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 ...
11k views

Does a tiny determinant imply ill-conditioning of a matrix?

If I have a square invertible matrix and I take its determinant, and I find that $\det(A) \approx 0$, does this imply that the matrix is poorly conditioned? Is the converse also true? Does an ill-...
17k views

Dealing with the inverse of a positive definite symmetric (covariance) matrix?

In statistics and its various applications, we often calculate the covariance matrix, which is positive definite (in the cases considered) and symmetric, for various uses. Sometimes, we need the ...
2k views

What is a good way to run parameter studies in C++

The problem I'm currently working on a Finite Element Navier Stokes simulation and I would like to investigate the effects of a variety of parameters. Some parameters are specified in an input file ...
26k views

What is the fastest way to calculate the largest eigenvalue of a general matrix?

EDIT: I am testing if any eigenvalues have a magnitude of one or greater. I need to find the largest absolute eigenvalue of a large sparse, non-symmetric matrix. I have been using R's ...
4k views

Are there any famous problems/algorithms in scientific computing that cannot be sped up by parallelisation

Are there any famous problems/algorithms in scientific computing that cannot be sped up by parallelisation? It seems to me whilst reading books on CUDA that most things can be.
8k views

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 ...
17k views

Fastest Delaunay triangulation libraries for sets of 3D points

Which is the fastest library for performing delaunay triangulation of sets with millions if 3D points? Are there also GPU versions available? From the other side, having the voronoi tessellation of ...
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 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 ...
5k views

Conservation of a physical quantity when using Neumann boundary conditions applied to the advection-diffusion equation

I don't understand the different behaviour of the advection-diffusion equation when I apply different boundary conditions. My motivation is the simulation of a real physical quantity (particle density)...
8k views

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 ...
754 views

Recommendations and experiences on which license to choose for software?

Developers of software have the choice to choose an appropriate license in accordance with the goal(s) of the work. Can anyone give some recommendations/experiences on which license to pick for ...
5k views

How can the gravitational n-body problem be solved in parallel?

How can the gravitational n-body problem be solved numerically in parallel? Is precision-complexity tradeoff possible? How does precision influence the quality of the model?
8k views

What is the computational cost of $\sqrt{x}$ in standard libraries?

One of the major issues that we have to deal with in molecular simulations is the calculation of distance-dependent forces. If we can restrict the force and distance functions to have even powers of ...
21k views

What considerations should I be making when choosing between BFGS and conjugate gradient for optimization? The function I am trying to fit with these variables are exponential functions; however, the ...
4k views

Modern C++ in scientific computing?

I am looking for books or articles, or blog-posts, or any published material in general, that address specifically the uses of C++ modern features (move semantics, the STL, iterators, lazy evaluation, ...
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 ...
6k views

Which package should I use to wrap Modern Fortran Code with Python?

I know of, and have used f2py2e to wrap some old Fortran 77 code, but my understanding is that it does not work with newer Fortran 95 code. I've researched what I should use, and have come across ...
53k views

How should I install a Fortran compiler on a Mac? (OS X 10.x, x >= 4)

Related question: State of the Mac OS in Scientific Computing and HPC A significant number of software packages in computational science are written in Fortran, and Fortran isn't going away. A ...
2k views

How does one test a numerical ODE solver implementation?

I'm about to start working on a software library of numerical ODE solvers, and I'm struggling with how to formulate tests for the solver implementations. My ambition is that the library, eventually, ...
4k views

What is the purpose of using integration by parts in deriving a weak form for FEM discretization?

When going from the strong form of a PDE to the FEM form it seems one should always do this by first stating the variational form. To do this you multiply the strong form by an element in some (...
4k views

What software is good to use for parallel debugging?

I'm not running any parallel code right now, but I anticipate running parallel code in the future using a hybrid of OpenMP and MPI. Debuggers have been invaluable tools for me when running serial ...
1k views

Why is the time dimension special?

Generally speaking, I've heard numerical analysts utter the opinion that "Of course, mathematically speaking, time is just another dimension, but still, time is special" How to justify this? In ...
8k views

I am looking for a tool to visualize very large directional link graphs. I currently have ~2million nodes with ~10million edges. I have tried a few different things, but most take hours to even do ...
9k views

4k views

Future of OpenCL?

The OpenCL programming paradigm promises to be a royalty free opens standard for heterogenous computing. Should we invest our time in developing software based on OpenCL? Pros/cons?