Most Popular
1500 questions
7
votes
1 answer
Random access random permutations
I have a large number of parallel processes and a large integer $n$, and want to randomly partition the integers $[0,n)$ among the processes with only $O(1)$ communication.
One nice way to do this would to generate a pseudorandom permutation $\pi…
Geoffrey Irving
- 3,969
- 18
- 41
7
votes
3 answers
ROOT (CERN C++ Libraries) alternatives
I have been slowly learning C++ and ROOT for over a year now, in order to debug a program made with it.
Now I reached a point where I can really understand that this will never become easier. Therefore I'm looking for some advices in…
Presbitero
- 193
- 1
- 6
7
votes
1 answer
Numerical method for nonlinear system of algebraic equations of special type
I have a nonlinear system of algebraic equations of special kind:
$$
\begin{array}{rcl}
x_{i}+y_{i}+z_{0,1}+c_{i,1}z_{1,1} & = & d_{i,1}, \\
x_{i}^2 + y_{i}^2 + z_{0,2} + c_{i,1} z_{1,2} + c_{i,2} z_{2,2} & = & d_{i,2} \\
\ldots & = &…
Appliqué
- 445
- 3
- 10
7
votes
2 answers
How can I tell which options PETSc was compiled with?
I'm working on a machine with a version of PETSc compiled by someone else. Is there a straightforward way to find out which options were used at compile time from the installation itself? For example, is there a file that has all of the compile…
Dan
- 3,355
- 3
- 21
- 47
7
votes
1 answer
Unexpected result when summing sorted (and unsorted) positive floating point numbers
I am exploring Higham's excellent Accuracy and Stability of Numerical Algorithms and chapter 4 is dedicated to summation.
So I decided to test the most basic thing. Summing positive random numbers uniformly distributed between $0$ and $1$ (exactly…
lucmobz
- 71
- 2
7
votes
2 answers
Poor test functions for optimization
I have been looking in detail into one of the many "meta-heuristic" optimization algorithms and became suspicious at how well it appeared to perform (compared to other methods like Nelder-Mead, Multi-Directional search, and Spiral optimization) on a…
m4r35n357
- 215
- 6
7
votes
3 answers
How large is large for direct solvers?
Let us say I want to solve a large sparse linear system. It is said that iterative solvers should be better than direct solvers in this case. But how large is large? What is the exact threshold beyond which I must use iterative solvers? A thousand…
timur
- 181
- 5
7
votes
2 answers
Representing charges in computer programming
I'm preparing for a thesis in computer science on calculations based on concepts from Neuroelectrodynamics.
In short this theory states, that information transfer is not done by spike time coding, but by movement of electric charges. Also this…
user390
7
votes
1 answer
Eigenvalues of a $d\times d$ diagonal+rank1 matrix in $O(d)$ time?
Suppose $h$ is a vector of $d$ positive numbers adding up to 1. I'm looking for a $O(d)$ algorithm to estimate eigenvalues of the following diagonal + rank1 matrix:
$$A=2\operatorname{diag}(h)-hh^T$$
Empirically it appears that $2h$ gives a good…
Yaroslav Bulatov
- 2,655
- 11
- 23
7
votes
1 answer
Computing powers of diagonal + rank-1 matrix?
I'm using a numeric root-finder to find $k$ satisfying $\|A^k x\|=c$ where $A$ is a symmetric $d\times d$ diagonal + rank-1 matrix. How to compute $A^k x$ efficiently?
For integer $k$, I can get the answer in $O(k d)$ time using iterated…
Yaroslav Bulatov
- 2,655
- 11
- 23
7
votes
0 answers
Matrix-free FEM references
I've seen that many people are using matrix-free fem codes in my community (mechanical engineering). I have to admit that I googled a bit and I didn't manage to find a good reference for the subject. Even a quick look to the books cited in this…
FEGirl
- 313
- 3
- 9
7
votes
4 answers
Euler integration of the three-body problem
Me and one of my colleague are trying to simulate the three-body problem with a C++ program in order to compare different integration schemes. At the moment we are trying to use the Euler's method, but we're stuck on a divergence problem.
Using the…
jack23456
- 171
- 7
7
votes
3 answers
Reference request: Philosophy of Computational Science
Do you suggest any references (papers, monographs, books) about the philosophy of computational science?
Recently, I found out about the following two:
Winsberg, E. (2009). Computer simulation and the philosophy of science. Philosophy Compass,…
nicoguaro
- 8,500
- 6
- 23
- 49
7
votes
1 answer
How does non-dimensionalization improve the behavior of ODE solvers?
I have a set of coupled ODEs that I'm solving numerically. The independent variable is time and runs from values of $10^{15}$ to $10^{17}$ in units of seconds. The state variables in their usual physical units have large numbers like $10^{10}$ and…
quantumflash
- 193
- 5
7
votes
1 answer
Which preconditioners make Richardson iteration convergent?
Suppose we solve an $m\times n$ full-rank system of equations $Ax=b$ by iterating the following for a small enough $\mu>0$
$$x=x+\mu B(b-Ax)$$
Is there a nice description of kinds of $B$ which make this iteration convergent?
For instance, for $n=1$,…
Yaroslav Bulatov
- 2,655
- 11
- 23