Most Popular
1500 questions
7
votes
0 answers
Sparse matrix format and sparse-matrix sparse-matrix multiplication
I'm having some performance problems with my code dealing with the multiplication of big sparse matrices (stiffness and aerodynamic influence coefficient matrices).
Mainly I have to multiply such matrices frequently in my code with each other.…
murph_sof
- 71
- 1
7
votes
1 answer
Numerical solution of hyperbolic PDEs with nonconvex flux
In some hyperbolic PDEs the flux is nonconvex.
One example is equations in magnetohydrodynamics. What are the complications in the wave structures of such problems? What general precautions one should take while coding such a system? Which numerical…
Subodh
- 1,480
- 14
- 31
7
votes
1 answer
Integer vs float multiplication performance, modern CPUs
Are there benchmarks for how many multiplications of various integer types compared to floating point types can be achieved per second on modern CPUs?
I'm trying to get some hint if it would be worth to make a c implementation of an integer…
mathreadler
- 380
- 4
- 15
7
votes
1 answer
Optimal way to find stationary solutions of the PDE
I am researching heat diffusion in an optical element irradiated by laser. This problem is described by the PDE which I wrote down in this question. I am using an implicit numerical scheme to model the heat distribution evolving in time.
After some…
gmk
- 455
- 4
- 8
7
votes
0 answers
Compute sparsity pattern of $A^2$
Suppose we have a sparse matrix $A$. Is there any way to compute just the sparsity pattern of $A^2 = A \cdot A$ (I do not actually need to know what exactly the nonzero value are) faster than to compute the full sparse product $A \cdot A$?
vainia
- 121
- 4
7
votes
1 answer
Where does the floating point error come from? (Finite difference using matrix multiplication versus shifts and adding.)
In Julia it appears that one picks up some error terms when doing finite differences using matrix multiplication versus shifts and addition.
julia> n = 1000
1000
julia> hessM = circshift(eye(n),-1) + circshift(eye(n),1) - 2* eye(n);
julia>…
Willie Wong
- 677
- 2
- 6
- 15
7
votes
1 answer
Are there special methods for solving $f'(z)=0$ for analytic $f$?
I am trying to solve a bunch of equations for the zeros of the derivative of an analytic function, and I would like to know if there exist methods that exploit this structure to provide better performance than the standard algorithms.
At the moment…
Emilio Pisanty
- 826
- 9
- 15
7
votes
2 answers
C++ libraries for Fast Fourier Transform in high precision
I am looking for a C++ library for Fast Fourier Transform (FFT) in high precision (e.g., using high precision real data types similar to mpfr_t in MPFR or cpp_dec_float in BOOST). The preference is for open-source or, if not available, at least…
user3605620
- 226
- 1
- 2
- 7
7
votes
1 answer
Robust smoothers for geometric multigrid
I'm searching for robust smoothers for geometric multigrids.
By robust I mean:
Effective for high order approximations (say spectral element, spectral Discontinuous Galerkin),
Parallel (suitable for co-processors),
Effective for heterogeneity and…
user331493
- 71
- 4
7
votes
4 answers
Why is $\exp(\ln(x))-x\neq0$ in floating point arithmetic?
Analytically, the expression
$$\exp(\ln(x))-x \enspace,$$
should give 0.
However, in Matlab, it does not.
x = linspace(1, 10, 10);
exp(log(x)) - x;
for $x \in [1, 10]$, the answer is
0
0
-4.44089209850063e-16
0
0
0
0 …
user65452
- 319
- 1
- 11
7
votes
3 answers
Very simple (real) experiment for computational methods class
I am in the process of collecting material for a class in computational methods. It will include introductions into numerical methods for ordinary differential equations (Runge-Kutta methods, multi-step methods) and parabolic and hyperbolic partial…
Daniel
- 1,273
- 10
- 22
7
votes
3 answers
role of initial guess for iterative linear solver
Suppose we use a preconditioned iterative solver for a linear system. If the initial state for the solver can be chosen very close to the exact solution - does this reduce requirements for the preconditioner?
Maxim Umansky
- 2,525
- 1
- 12
- 15
7
votes
4 answers
How can I find a line segment with the most intersections along with the coordinates of the intersection points?
There are $n$ points in a 2-D plane and each is given by its $x$ and $y$ coordinates. They are stored in an array in an ascending order with respect to $x$.
All points are connected together by line segments ($n\choose 2$ lines). Within the…
Anuraj Kathait
- 71
- 3
7
votes
1 answer
Finite difference recursion and higher order
This may be a trivial question, but I've always wondered...
For the classical, central finite difference schemes, if I'm interested in determining the second derivative, does applying the first derivative scheme recursively (2x) give the same answer…
ThatsRightJack
- 183
- 6
7
votes
2 answers
CFD visualization workflow: Visit vs Paraview vs Tecplot and others
For those familiar with more of these tools than I am, what are the pros and cons of the various tools available? Right now I exclusively use Tecplot for CFD visualization, but it leaves a lot to be desired. The vector graphics are okay, but not…
Aurelius
- 2,365
- 1
- 15
- 19