Daniel Shapero
  • Member for 9 years, 1 month
  • Last seen this week
What numerical methods are used to model deformations in elastic physics?
2 votes

TL,DR: either the good old Galerkin finite element method, or mesh-free / particle methods. There are a few things to unpack here. First, the simulation you show includes contact between an elastic ...

View answer
Cholesky decomposition vs LDL decomposition
4 votes

As the commenters have already said, for your specific problem, QR factorization might be a better approach not because of speed but because of numerical stability. It's still a good question to ask ...

View answer
Symplectic linear multistep method?
Accepted answer
4 votes

Yes, but you have to mean symplectic on a higher-dimensional phase space than your original problem that includes previous steps too. As I understand there are also some subtle stability issues too. ...

View answer
Numerically solving a non-linear PDE
Accepted answer
5 votes

First off, the PDE can be rewritten instead as $$\frac{\partial C}{\partial t} = \frac{\partial}{\partial x}C\frac{\partial C}{\partial x}$$ or, by applying the product rule in reverse again, as $$\...

View answer
Formulation of the least-squares parameter estimation problem
2 votes

You can think of the ODE as a constraint between the parameters $V$ and the observed variable $y$. To enforce constraints in optimization problems, you can introduce a Lagrange multiplier, which we'll ...

View answer
fastest linear system solve for small square matrices (10x10)
7 votes

Using an Eigen matrix type where the number of rows and columns is encoded into the type at compile time gives you an edge over LAPACK, where the matrix size is known only at runtime. This extra ...

View answer
Penalization parameter for DG with jump penalization
Accepted answer
2 votes

TL;DR: Let $k$ be the diffusion coefficient, $\theta$ the minimum angle between any two edges of the mesh, $d$ the space dimension, and $p$ the polynomial degree of the finite element basis you're ...

View answer
Ways to solve $Ax=b$ for a sparse (banded) $A$ with updates
Accepted answer
6 votes

If the only non-zero entries of $A_{ij}$ have $j$ in $\{i - 1, i, i + 1\}$, then $A$ is a banded matrix with bandwidth 1. More generally, you can talk about matrices of bandwidth $k$ where $k$ is any ...

View answer
Writing a parallel version of an algorithm. Only which someparts are worth distributing
Accepted answer
10 votes

If the operation is as trivial as you say, and each node has all the information necessary to carry out the operation, then the communication will be substantially more expensive than recomputing ...

View answer
3D contour mesh computation
5 votes

In addition to the voxel-based approach that rchilton suggests, you could also look at Delaunay-type algorithms. For example, the Computational Geometry Algorithms Library (CGAL) has some built-in ...

View answer
Numerically solving a PDE on an unit tangent bundle
2 votes

I looked around a bit and found this paper (featuring no less than Shing-Tung Yau!) about the problem of generating meshes for the unit tangent bundle $UT(S^2)$ on the 2-sphere $S^2$. As you point out,...

View answer
Why are Hamiltonian dynamics used in MCMC?
2 votes

I'm a little late to reply but I found this review to be really informative. One particularly nice feature of Hamiltonian flows is that they preserve volume in phase space. If we take an infinitesimal ...

View answer
Interpolate the orbital coordinates of an object using coordinates and velocities vector
8 votes

That depends on how well you know the coordinates and velocities. If you have exact values, you can get a reasonable answer using Hermite interpolation. This will give you a degree-3 polynomial in ...

View answer
Normalizing a density matrix at each iteration
Accepted answer
5 votes

As always with numerical problems, it's a good idea to simplify things as much as possible to isolate what's really going wrong. You can simplify the problem by considering the evolution of a pure ...

View answer
Quantifying the degree of nonlinearity in a heat transfer problem
4 votes

A quick and dirty approach to quantify the nonlinearity could be to evaluate $$\frac{1}{k}\frac{dk}{dT}\frac{\partial T}{\partial t}\delta t.$$ It's dimensionless and quantifies how much relative ...

View answer
Knapsack problem with fixed number of elements?
0 votes

The number of subsets of size $m$ of a set of size $n$ is $\binom{n}{m}$, which is bounded by $\left(\frac{n}{m}\right)^m \le \binom{n}{m} \le \left(\frac{en}{m}\right)^m$. So in the limit of $m \ll ...

View answer
How to calculate $\arg(z_1z_2\cdots z_n)$ to minimize results error?
Accepted answer
6 votes

As Brian Borchers pointed out, the question only makes sense up to factors of $2\pi$. I'll assume that you want an answer in $[0, 2\pi)$ then. If there are really big contrasts in the magnitudes $|...

View answer
Algorithm for finding initial conditions of differential equations given trajectory
1 votes

As Christian Clason alluded to in his comment, you have reinvented the ensemble Kalman filter! The Kalman filter is an algorithm for estimating, from imperfect measurements, the true state of a system ...

View answer
What is the difference between recursive bisection and direct k-way partition?
2 votes

Your intuition is correct -- a bisection method cuts the (hyper)graph in two, and recursive bisection repeatedly applies this strategy until the desired number of cuts have been made. Direct ...

View answer
Generating set of points on a surface defined by constraint
3 votes

If you're interested in surface meshing, the book Delaunay Mesh Generation by Cheng, Dey, and Shewchuk is very good. Surface meshing is a pretty involved topic and I couldn't attempt to summarize it ...

View answer
pde-constrained optimization
Accepted answer
1 votes

I found the following books pretty helpful: Vogel - Computational Methods for Inverse Problems Parker - Geophysical Inverse Theory Aster, Borchers, Thurber - Parameter Estimation and Inverse Problems ...

View answer
How to determine a PDE which is structure-preserving (energy, mass conserved)?
2 votes

As Bruno Levy pointed out, certain classes of physical systems have well-known structural properties. For example, consider a Hamiltonian system $\dot z = J\nabla H(z)$ where $J$ is a symplectic ...

View answer
Approximating solutions to quadratic recurrence boundary value problem
2 votes

In addition to Kirill's excellent answer, one thing I think work mentioning is Smale's $\alpha$-theory. One of the hard parts about applying Newton's method is that, if you don't make a really good ...

View answer
Galerkin method: Test functions vs. Basis functions
Accepted answer
12 votes

Suppose that the solution $u$ of the PDE lives in some function space $X$. We'll write the PDE as a bilinear form $A(u, v) = f(v)$ for all $v$ in $X$, where $f$ is some element of the dual space $X^*...

View answer
Data structure for efficient high dimensional histogramming
1 votes

If the index for a bin is some $d$-tuple of integers $\{k_1, \ldots, k_d\}$, one approach that might work is to come up with a hash function $h$ for bin indices and use an unordered_map from the C++ ...

View answer
Difference in performance of preconditioned GMRES and MINRES
Accepted answer
3 votes

Are you applying MINRES to the operator $B^{-1}A$? Unless $B$ and $A$ commute, which is unlikely, the product $B^{-1}A$ is not symmetric. I'm guessing that this is what happened in your case because ...

View answer
Sparse matrix inverse with reduced bandwidth
1 votes

Three things immediately come to mind: R might not take advantage of sparsity when using the solve command to compute the inverse of a matrix. Usually, the inverse of a sparse matrix is dense, so the ...

View answer
FEM with flat triangles
3 votes

A good resource if you're interested in this sort of thing would be What is a Good Linear Finite Element? by Johnathan Richard Shewchuk. Large angles tend to degrade the quality of finite element ...

View answer
Regarding impractical usage of direct solvers of linear systems
5 votes

The "100,000 unknowns" rule-of-thumb applies to sparse matrices rather than dense ones. A naive direct solver, which doesn't take advantage of sparsity at all, could in principle have $O(n^3)$ ...

View answer
Direct solvers and domain decomposition for FEM
Accepted answer
1 votes

As I understand, this is a fairly popular approach. Direct solvers are usually more efficient than iterative solvers for < 100,000 unknowns, so you partition the problem into subproblems of roughly ...

View answer