Most Popular
1500 questions
16
votes
2 answers
Best practice for storing hierarchical simulation data
TL,DR
What is the accepted best practice in scientific computing circles for storing large quantities of hierarchically structured data? For example, SQL does not play nicely with large sparse matrices. Is there a good tool out there for…
tel
- 1,380
- 12
- 23
16
votes
1 answer
Why is leapfrog integration symplectic and RK4 not, if the latter is more accurate?
In a system where energy theoretically should be conserved, the most accurate simulation would conserve energy (as well as giving accurate positions, velocities and etc). RK4 is more accurate than leapfrog, yet leapfrog conserves energy and RK4…
userManyNumbers
- 275
- 2
- 6
16
votes
2 answers
Compute all eigenvalues of a very big and very sparse adjacency matrix
I have two graphs with nearly n~100000 nodes each. In both graphs, each node is connected to exactly 3 other nodes so the adjacency matrix is symmetric and very sparse.
The hard part is I need all eigenvalues of the adjacency matrix but not…
Mahdi
- 263
- 2
- 8
16
votes
3 answers
Single versus double floating-point precision
Single precision floating point numbers take up half the memory and on modern machines (even on GPUs it seems) operations can be done with them at almost twice the speed compared to double precision. Many FDTD codes that I have found exclusively use…
Costis
- 1,330
- 11
- 18
16
votes
3 answers
Role of the numerical flux in DG-FEM
I am learning the theory behind DG-FEM methods using the Hesthaven/Warburton book and I am a bit confused about the role of the 'numerical flux.' I apologize if this is a basic question, but I have looked and not found a satisfactory answer to it.…
user3482876
- 672
- 3
- 16
16
votes
1 answer
Usefulness of elements with mesh-dependent stability
After doing some mathematics related to the stability of elements in 3D Stokes problem I was slightly shocked to realize that $P_2-P_1$ is not stable for an arbitrary tetrahedral mesh. More precisely, in case you have an element where all nodes and…
knl
- 2,096
- 11
- 17
16
votes
5 answers
Apply PCA on very large sparse matrix
I am doing a text classification task with R, and I obtain a document-term matrix with size 22490 by 120,000 (only 4 million non-zero entries, less than 1% entries). Now I want to reduce the dimensionality by utilizing PCA (Principal Component…
Ensom Hodder
- 325
- 2
- 5
16
votes
3 answers
What are the advantages and disadvantages of the particle decomposition and domain decomposition parallelization algorithms?
I am running molecular dynamics (MD) simulations using several software packages, like Gromacs and DL_POLY.
Gromacs now supports both the particle decomposition and domain decomposition algorithms. By default, Gromacs simulations use domain…
Andrew
- 711
- 1
- 5
- 12
16
votes
2 answers
In FEM, why is the stiffness matrix positive definite?
In FEM classes, it's usually taken for granted that the stiffness matrix is positive definite, but I just can't understand why. Could anyone give some explanation?
For instance, we can consider the Poisson problem:
$$ -\nabla^2 u = f,$$
whose…
user123
- 679
- 1
- 5
- 16
16
votes
4 answers
Book reference for Numerical Analysis
I've had a glimpse of Numerical Analysis (majorly, Numerical Methods like root finding, quadratic equations and other preliminary stuff) in my Calculus class but now, I find myself wanting more sophistication in my work.
Is there a good book which…
Inquest
- 3,394
- 3
- 26
- 44
16
votes
7 answers
Robust computation of the mean of two numbers in floating-point?
Let x, y be two floating-point numbers. What's the right way to compute their mean?
The naive way (x+y)/2 can result in overflows when x and y are too large. I think 0.5 * x + 0.5 * y maybe better, but it involves two multiplications (which maybe is…
a06e
- 1,729
- 15
- 22
16
votes
3 answers
Why would a computational scientist need to implement their own version of std::complex?
Many of the better-known C++ libraries in computational science such as Eigen, Trilinos, and deal.II use the standard C++ template header library object, std::complex<>, to represent complex floating-point numbers.
In Jack Poulson's answer to a…
Aron Ahmadia
- 6,951
- 4
- 34
- 54
16
votes
1 answer
How to formulate lumped mass matrix in FEM
When solving time dependent PDE's using the finite element method, for example say the heat equation, if we use explicit time stepping then we have to solve a linear system because of the mass matrix. For example if we stick with the heat equation…
James
- 1,889
- 1
- 16
- 31
16
votes
2 answers
What are the best practices for algorithms and implementation of multi-physics simulations?
Multi-physics simulation involves coupling multiple "physics", often with different space and/or time scales. Additionally, the single-physics codes are often written by different teams. The most commonly used coupling technique is first-order…
Jed Brown
- 25,650
- 3
- 72
- 130
16
votes
1 answer
How can I determine the period of my pseudo-random number generator?
Suppose I'm using a linear congruential pseudo-random number generator (PRNG). Given a seed $x_0$, the multiplying factor (a), the shift factor (c) and the modulus factor (m), how can I determine the period of my PRNG? Do I determine it by…
Paul
- 12,045
- 7
- 56
- 129