Most Popular

1500 questions
8
votes
2 answers

Looking for an algorithm that allocates climbing hold colors to wall sectors

I posted this question earlier on stackoverflow, where it was closed as off-topic. I hope it survives here. I our climbing gym, the routes need to be re-set from time to time. The following rules apply: We have climbing holds with a number of…
Christoph
  • 245
  • 2
  • 9
8
votes
9 answers

Do I need to learn C?

I am a PhD student in Scientific Computing and over the past few months, I spent a good amount of time learning Python and C++ the right way. I feel that I have learnt C++ well and I can use Python to do what I want if I keep a good reference book…
Inquest
  • 3,394
  • 3
  • 26
  • 44
8
votes
1 answer

Asymptotic convergence of the solution to a parabolic pde to the solution of an elliptic pde

Suppose I have the parabolic system $$u_t=\nabla\cdot(k(x)\nabla u)+f,\quad (x,t)\in\Omega\times I$$ with Dirichlet boundary conditions $$u=g, \quad x\in\partial\Omega$$ and initial condition $$u(x,t)= h,\quad t=0.$$ Often times in engineering, we…
Paul
  • 12,045
  • 7
  • 56
  • 129
8
votes
2 answers

Approximation of partial derivative of a function of stochastic variable

Let $X_t$ be an Ito process $$ dX_t=a(X_t,t)dt + b(X_t,t)dW_t $$ where $W_t$ is a Wiener process. A numerical approximations of the solution of this equations is proposed by Milstein: $$ X_T=X_t+a(X_t,t) \Delta t+ b(X_t,t)\Delta W_t+…
Fabio
8
votes
1 answer

OpenFoam vs FiPy

I need to learn and utilize a finite volume automated solution package for a project I'm working on and have narrowed it down to these two packages. I was wondering if anybody has experience of both packages and could perhaps comment on a…
dmon
  • 338
  • 2
  • 8
8
votes
2 answers

Finding the distribution (histogram) of eigenvalues for large sparse matrices

Are there any existing programs that are able to compute the (approximate) distribution of eigenvalues for very large (symmetric) sparse matrices? Note that I do not need the eigenvalues themselves, only their distribution (finding all the…
Szabolcs
  • 2,620
  • 2
  • 19
  • 34
8
votes
2 answers

How to solve the stiff equation in this Restricted Three Body Problem numerically?

I've come across a stiff equation in solving the Circular Restricted Three Body Problem. [An object is moving considering the effect of the gravitational forces caused by two gravitational sources fixed in a 2D Space.] The equations are…
8
votes
1 answer

What algorithm to use for parallel dense matrix inversion on at most 8 cores?

I need to implement parallel dense matrix inversion for a language I am using that appears to not have an existing library for this (specifically IDL using IDL Bridge for message passing). I am familiar with parallel programming methods through…
Bogdanovist
  • 287
  • 2
  • 6
8
votes
1 answer

Testing and visualizing large index arrays

I will be implementing nodal discontinuous Galerkin method soon, and having done this before I know the basic indexing arrays I will need to compute, given a mesh and polynomial data. The problem I ran into in previous code were subtle mistakes I…
Reid.Atcheson
  • 3,283
  • 15
  • 17
8
votes
1 answer

Schur's Complement and Inverse of Block Matrices

Assume that we are given a block matrix of the form: $$ M = \left[ \begin{array}{cc} A & b \\ b^T & c \\ \end{array} \right] $$ where $b$ is a column vector. and $c$ is a scalar. Schur's complement of $A$ in $M$ is given by: $$ s = c - b^T A^{-1}…
Mohammad Fawaz
  • 523
  • 3
  • 9
8
votes
1 answer

Nonlinear wave equation - Finite element or finite difference

I would like to know the which is more advantageous when it comes to solving nonlinear hyperbolic equations, Finite Element or Finite difference methods? Which method will be better in capturing shocks? Is it possible to provide a detailed…
vijay
  • 203
  • 1
  • 4
8
votes
2 answers

Computing ratio of trigonometric functions

I have need to compute the functions: $$ f(x) = \frac{\sin^{-1}x}{x}$$ and $$ g(x) = \frac{\sin a x}{\sin x} $$ where $a\in[0,1]$ and $ x\in[0,\frac{\pi}{2}]$ and is often very small ($x\ll 1$). Are there any general ways of generating highly…
Victor Liu
  • 4,480
  • 18
  • 28
8
votes
2 answers

Max of a convex combination over a convex hull of real variables

I have the following linear program: $$ \begin{array}{cc} \text{Maximize} & a^T x \\ \text{Subject to} & x_{\min} \leq x \leq x_{\max} \\ & \mathbf{1}^T x = 1 \end{array} $$ where $x \in \mathbb{R}^n$, $\mathbf{1}^T x$ denotes…
Mohammad Fawaz
  • 523
  • 3
  • 9
8
votes
3 answers

Evaluating sine and cosine of an integer multiple of an angle

When evaluating cylindrical harmonics, one needs to evaluate trigonometric functions $\cos(m\theta)$ and $\sin(m\theta)$, potentially for large integer $m$ and $\theta\in[-\pi,\pi]$. What is the best way to do this in C code? Currently, I just…
Victor Liu
  • 4,480
  • 18
  • 28
8
votes
1 answer

Rebinning algorithm in VEGAS

I am trying to understand the rebinning algorithm of the VEGAS (original publication (preprint from LKlevin) and implementation notes) Monte Carlo integration. I will try to explain first what I think I understood and then pose my questions. For…
cschwan
  • 131
  • 3