Most Popular
1500 questions
14
votes
3 answers
SVD for finding the largest eigenvalue of a 50x50 matrix -- am I wasting significant amounts of time?
I've got a program that computes the largest eigenvalue of many real symmetric 50x50 matrices by performing singular-value decompositions on all of them. The SVD is a bottleneck in the program.
Are there algorithms that are much faster in finding…
Anna
- 243
- 1
- 4
14
votes
2 answers
Quality of linear congruential generators for random numbers
I'm doing some simulations of the Langevin equation, for various external forces. Being told that C's rand() from stdlib.h can introduce bias in my results, I'm using a Mersenne Twister.
Nevertheless, I would like to know (and see) exactly what kind…
RedPointyJackson
- 163
- 9
14
votes
3 answers
Best practices for describing agent-based models
I work fairly heavily in mathematical biology/epidemiology, where most of the modeling/computational science work is still dominated by sets of ODEs, admittedly sometimes fairly elaborate sets of them. One of the plusses of these models is that…
Fomite
- 2,383
- 1
- 18
- 25
14
votes
6 answers
What is a common file/data format for a mesh (for FEM)?
I'm developing an FEM simulation. For early testing, I will use simple self-written mesher and visualisation of the mesh graph. But I want to prepare my program to use data generated by an existing mesher and output it to existing visualisation…
Michael
- 1,463
- 11
- 22
14
votes
4 answers
Why are Runge-Kutta and Euler's method so different?
I am solving a system of linear equations, $\underline {\dot x}=\underline A\cdot \underline x$, numerically. I have done this using the popular of methods of Euler and Runge-Kutta (RK). I have noticed quite a difference between the two in accuracy…
user16937
14
votes
2 answers
Periodic boundary condition for the heat equation in ]0,1[
Let us consider a smooth initial condition and the heat equation in one dimension :
$$ \partial_t u = \partial_{xx} u$$
in the open interval $]0,1[$, and let us assume that we want to solve it numerically with finite differences.
I know that for my…
bela83
- 443
- 1
- 3
- 12
14
votes
3 answers
Is Hartree-Fock always a good approximation for molecular geometries and no bond breaking ?
Are there cases where Hartree-Fock is not a good approximation to compute equilibrium geometry when the molecule is in a non bond-breaking condition?
Stefano Borini
- 1,599
- 3
- 16
- 20
14
votes
1 answer
How is Krylov-accelerated Multigrid (using MG as a preconditioner) motivated?
Multigrid (MG) may be used to solve a linear system $Ax=b$ by constructing an initial guess $x_0$ and repeating the following for $i=0,1..$ until convergence:
Compute the residual $r_i = b-Ax_i$
Apply a multigrid cycle to obtain an approximation…
Patrick Sanan
- 849
- 5
- 16
14
votes
3 answers
Understanding how Numpy does SVD
I have been using different methods to calculate both the rank of a matrix and the solution of a matrix system of equations. I came across the function linalg.svd. Comparing this to my own effort of solving the system with Gaussian Elimination, it…
RobVerheyen
- 529
- 1
- 3
- 11
14
votes
4 answers
How to create a random 3D domain representing a plant's root structure?
I would like to model laminar flow of water from roots to the stem of a plant. At the very end of the roots, the tubes vary from millimeter to centimeter scale in diameter and length. As we get closer to the stem the roots get larger in length and…
Naveen
- 141
- 2
14
votes
3 answers
Why is my parallel solver slower than my sequential solver?
I was playing around with PETSc and noticed that when I run my program with more than one process via MPI it seems to run even slower! How can I check to see what is going on?
Sean Farley
- 1,370
- 12
- 16
14
votes
3 answers
Alternatives to Comsol Multiphysics
This might be a question better suited for the Software Recommendations side of S.E., however I do believe that people who frequent this part of S.E. are more likely to be able to answer this question.
I am looking for a free (not only as in…
V.Vocor
- 255
- 1
- 2
- 6
14
votes
1 answer
Is there a tool out there that can generate interval extensions of Fortran (or C) functions by parsing Fortran (or C) code?
Case studies in my PhD thesis require that I have interval extensions of Fortran subroutines in CHEMKIN-II (apologies for the link; it's the best one I could find for a package no longer distributed by Sandia National Laboratory). CHEMKIN-II is a…
Geoff Oxberry
- 30,394
- 9
- 64
- 127
14
votes
4 answers
Looking for Runge-Kutta 8th order in C/C++
I would like to use Runge-Kutta 8th order method (89) in a celestial mechanics / astrodynamics application, written in C++, using a Windows machine. Therefore I wonder if anyone knows a good library / implementation that is documented and free to…
James C
- 277
- 2
- 8
14
votes
3 answers
How to impose boundary conditions in finite difference methods
I have a problem when I want to use the high order center difference approximation:
$$\left(\frac{-u_{i+2,j}+16u_{i+1,j}-30u_{i,j}+16u_{i-1,j}-u_{i-2,j}}{12}\right)$$
for the Poisson equation
$$(u_{xx}+u_{yy}=0)$$ in a square domain in which the…
liona
- 269
- 3
- 7