All Questions
9,432
questions
16
votes
6answers
22k views
Constraints involving $\max$ in a linear program?
Suppose
$$\begin{align*}
\min A &\mathrm{vec}(U) \\
&\text{subject to } U_{i,j} \leq \max\{U_{i,k}, U_{k,j}\}, \quad i,j,k = 1, \ldots, n
\end{align*}$$
where $U$ is a symmetric $n\times ...
16
votes
5answers
5k views
Parallel optimization algorithms for a problem with very expensive objective function
I am optimizing a function of 10-20 variables. The bad news is that each function evaluation is expensive, approx 30 min of serial computation. The good news is that I have a cluster with a few dozen ...
16
votes
2answers
2k views
Boost::mpi or C MPI for high performance scientific applications?
The thing I dislike most about MPI is dealing with datatypes (i.e. data maps/masks) because they don't fit that nicely with object oriented C++. boost::mpi only ...
16
votes
4answers
2k views
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 ...
16
votes
1answer
5k views
How to derive the Weak Formulation of a Partial Differential Equation for Finite Element Method?
I have taken a basic introduction to Finite Element Method, which did not emphasize a sophisticated understanding of a 'weak formulation'. I understand that with the galerkin method, we multiply both ...
16
votes
3answers
601 views
How should I study creating and programming HPC systems?
I'm in a field that doesn't necessarily do a great deal of HPC work, and when it does encounter it, it's often the result of researchers from other fields exploring new applications to their methods ...
16
votes
4answers
4k views
Selecting most scattered points from a set of points
Is there any (efficient) algorithm to select subset of $M$ points from a set of $N$ points ($M < N$) such that they "cover" most area (over all possible subsets of size $M$)?
I assume the points ...
16
votes
2answers
1k views
What are the efficient, accurate algorithms for evaluation of hypergeometric functions?
I'm curious to know what good numerical algorithms exist for evaluation of the generalized hypergeometric function (or series), defined as
$${}_pF_q(a_1,\ldots,a_p;b_1,\ldots,b_q;z) = \sum_{k=0}^{\...
16
votes
1answer
1k views
When should implicit methods be used in the integration of hyperbolic PDEs?
Numerical methods for solving PDEs (or ODEs) fall into two broad categories: explicit and implicit methods. Implicit methods allow larger stable timesteps but require more work per step. For ...
16
votes
5answers
5k views
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 ...
16
votes
1answer
2k views
Intuitive motivation for BFGS update
I am teaching a numerical analysis survey class and am seeking motivation for the BFGS method for students with limited background/intuition in optimization!
While I don't have time to prove ...
16
votes
2answers
1k views
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 ...
16
votes
1answer
1k views
Convergence rate of FFT Poisson solver
What is the theoretical convergence rate for an FFT Poison solver?
I am solving a Poisson equation:
$$\nabla^2 V_H(x, y, z) = -4\pi n(x, y, z)$$
with
$$n(x, y, z) = {3\over\pi} ((x-1)^2 + (y-1)^2 + (...
16
votes
2answers
297 views
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 ...
16
votes
1answer
13k views
How should boundary conditions be applied when using finite-volume method?
Following from my previous question I am trying to apply boundary conditions to this non-uniform finite volume mesh,
I would like to apply a Robin type boundary condition to the l.h.s. of the domain (...
16
votes
3answers
279 views
Uses of power series maps
I'm from the field of accelerator physics, specifically related to circular storage rings for synchrotron light sources. High energy electrons circulate around the ring, guided by magnetic fields. ...
16
votes
2answers
848 views
How can I choose a good Riemann solver when numerically solving a system of hyperbolic PDEs?
Many numerical methods for hyperbolic PDEs are based on the use of Riemann solvers. Such solvers are essential for accurately capturing shock waves. There are a range of such solvers available for ...
16
votes
3answers
4k views
Python OSS alternatives for Matlab Neural Network Toolbox. Any intercomparisons?
I'd like to be independent of commercial software for my scientific work. I find a dependence an commercial packages such as Matlab and its toolboxes unsatisfactory, because I do not know if I will ...
16
votes
1answer
242 views
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, ...
15
votes
5answers
14k views
Minimizing the Sum of Absolute Deviation ($ {L}_{1} $ Distance)
I have a data set $x_{1}, x_{2}, \ldots, x_{k}$ and want to find the parameter $m$ such that it minimizes the sum $$\sum_{i=1}^{k}\big|m-x_i\big|.$$
that is
$$\min_{m}\sum_{i=1}^{k}\big|m-x_i\big|.$$...
15
votes
4answers
1k views
Can the solution of a linear system of equations be approximated for only the first few variables?
I have a linear system of equations of size mxm, where m is large. However, the variables that I'm interested in are just the first n variables (n is small compared to m). Is there a way I can ...
15
votes
5answers
1k views
Why does the numerical solution of an ODE move away from an unstable equilibrium?
I wish to simulate the behaviour of a double-pendulum-like system. The system is a 2-degrees-of-freedom robot manipulator that is not actuated and will, therefore, behave mostly like a double-pendulum ...
15
votes
3answers
2k views
multigrid method to solve PDE
I need simple explanation of the Multigrid Method or some literature about this.
I am familiar with iterational methods including BiCGStab,CG,GS,Jacobi and preconditioning, but I am a beginner with ...
15
votes
7answers
869 views
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 ...
15
votes
2answers
2k views
Numerically stable way of computing angles between vectors
When applying the classical formula for the angle between two vectors:
$$\alpha = \arccos \frac{\mathbf{v_1} \cdot \mathbf{v_2}}{\|\mathbf{v_1}\| \|\mathbf{v_2}\|}$$
one finds that, for very small/...
15
votes
2answers
6k views
Implicit finite difference schemes for advection equation
There are numerous FD schemes for the advection equation $\frac{\partial T}{\partial t}+u\frac{\partial T}{\partial x}=0$ discuss in the web. For instance here:
http://farside.ph.utexas.edu/teaching/...
15
votes
4answers
5k views
Linear programming feasibility problem with strict positivity constraints
There is a system of linear constraints ${\bf Ax} \leq {\bf b}$ . I wish to find a strictly
positive vector ${\bf x} > 0$ that satisfies these constraints. That means, $x_i > 0$ is
required for ...
15
votes
3answers
1k views
Numerical methods for discontinuous r.s. ODEs
what are state of art methods for numerical solution of ODEs with discontinuous right side? I'm mostly interested piecewise-smooth right side functions, e.g. sign.
I'm trying to solve the equation of ...
15
votes
6answers
2k views
Are there open-source scientific libraries which use modern Fortran with OOP?
I've spent the last couple of months on coding a Fortran program for solving a particular PDE system (describes fluid flow/combustion). I tryed to use latest-standard Fortran and the new OOP ...
15
votes
2answers
5k views
What is the purpose of the test function in Finite Element Analysis?
In the wave equation:
$$c^2 \nabla \cdot \nabla u(x,t) - \frac{\partial^2 u(x,t)}{\partial t^2} = f(x,t)$$
Why do we first multiply by a test function $v(x,t)$ before integrating?
15
votes
3answers
2k views
Why isn't my Matrix-Vector Multiplication Scaling?
Sorry for the long post but I wanted to include everything that I thought was relevant in the first go.
What I want
I am implementing a parallel version of Krylov Subspace Methods for Dense Matrices. ...
15
votes
2answers
9k views
What is counterpoise correction?
What is counterpoise correction exactly ? Can you explain when it is needed and why ?
15
votes
4answers
2k views
Testing numerical optimization methods: Rosenbrock vs. real test functions
There seem to be two main kinds of test function
for no-derivative optimizers:
one-liners like the
Rosenbrock function ff., with start points
sets of real data points, with an interpolator
Is it ...
15
votes
1answer
509 views
Puzzling remark about stability region of fifth-order Runge-Kutta method
I came across a puzzling remark in the paper
P. J. van der Houwen, The development of Runge-Kutta methods for partial differential equations, Appl. Num. Math. 20:261, 1996
On lines 8ff on page 264, ...
15
votes
4answers
15k views
How do I calculate the numerical difference between two fields stored in two different VTK files with the same structure?
Suppose I have two VTK files, both in structured grid format. The structured grids are the same (they have the same list of points, in the same order), and there is a field, call it "Phi", in each VTK ...
15
votes
2answers
3k views
Is it possible to solve nonlinear PDEs without using Newton-Raphson iteration?
I am trying to understand some results and would appreciate some general comments on tackling nonlinear problems.
Fisher's equation (a nonlinear reaction-diffusion PDE),
$$
u_t = du_{xx} + \beta u ...
15
votes
2answers
349 views
What are new c++20 features that are relevant to scientific computation?
In my research department we plan a small seminar on the new c++20 language standard. There are exhaustive lists online presenting the new features of the language standard, some of which will be of ...
15
votes
2answers
2k views
FeniCS: Visualizing high order elements
I've just started messing around with FEniCS. I am solving Poisson with 3rd order elements and would like to visualize the results. However, when I use plot(u), the visualization is just a linear ...
15
votes
3answers
1k views
Is variable scaling essential when solving some PDE problems numerically?
In semiconductor simulation, it is common that the equations are scaled so they have normalised values. For example, in extreme cases electron density in semiconductors can vary over 18 order of ...
15
votes
3answers
848 views
What is a scalable preconditioner for high-frequency Helmholtz?
Standard multigrid and domain decomposition methods do not work, but I have large 3D problems and direct solvers are not an option. What methods should I try?
How are my choices affected by the ...
15
votes
2answers
419 views
SciComp Modeling Jobs
The meta seemed to suggest that career advice is ok . . . so here goes.
I have a couple of close friends in the ML and mathematical modeling fields just finishing PhD's and starting out on the job ...
15
votes
1answer
2k views
Can a Krylov subspace method be used as a smoother for multigrid?
As far as I am aware, multigrid solvers use iterative smoothers such as Jacobi, Gauss-Seidel, and SOR to dampen the error at various frequencies. Could a Krylov subspace method (like conjugate ...
15
votes
2answers
1k views
Estimation of condition numbers for very large matrices
Which approaches are used in practice for estimating the condition number of large sparse matrices?
15
votes
3answers
539 views
Scientific Programming Contests
I regularly compete in so called "Programming Contests", where you solve difficult algorithmic problems with your own code and problem solving skills during a limited time-frame. For referential ...
15
votes
3answers
365 views
Citable references for software best practices
I'm currently writing up my PhD thesis. I spent a significant fraction of my PhD cleaning up and extending existing scientific code, applying software engineering best practices which were previously ...
15
votes
4answers
1k views
Optimal ODE method for fixed number of RHS evaluations
In practice, the runtime of numerically solving an IVP
$$
\dot{x}(t) = f(t, x(t)) \quad \text{ for } t \in [t_0, t_1]
$$
$$
x(t_0) = x_0
$$
is often dominated by the duration of evaluating the right-...
15
votes
3answers
7k views
Fortran: Best way to time sections of your code?
Sometimes while optimizing code it is required to time certain portions of the code, I have been using the following for years but was wondering if there is a simpler/better way to do it?
...
15
votes
1answer
818 views
What is the correct way of integrating in astronomy simulations?
I'm creating a simple astronomy simulator that should use Newtonian physics to simulate movement of planets in a system (or any objects, for that matter). All the bodies are circles in an Euclidean ...
15
votes
3answers
5k views
How is B3LYP implemented in Gaussin 0*, GAMESS-US, Molpro, … etc?
Specifically I want to extend work involving B3LYP started with Gaussian 03 but continued with GAMESS-US. The energies provided by the default B3LYP methods are not the same. There is a discussion ...
15
votes
1answer
810 views
Complexity of MD simulations
I'm new to molecular dynamics (MD) simulations. What is the complexity of a molecular dynamics simulation in terms of simulation time? In other words, if I want increase the simulated time from 10 ...