# Questions tagged [numerics]

The tag has no usage guidance.

853 questions
Filter by
Sorted by
Tagged with
84 views

I am trying to program the pieceewise quadratic lagrange, but I have to deal with these intervals at which the point I am trying to evaluate belongs to. So, essentially you need to have an if ...
123 views

### Trust region - Newton: how to choose constants that determine trust region bound

In a trust region based Newton method, a number of constants are given as inputs to the algorithm that determine the updating rules for the trust region bound. Are these constants chosen arbitrarily ...
5k views

### Integral in log-log space

I'm working with functions which, in general, are much smoother and better behaved in log-log space --- so that's where I perform interpolation/extrapolation, etc, and that works very well. Is there ...
122 views

### 1-D finite differences with piecewise linear solution

I was having some lectures and I didn't quite understand the following: let's say you have a grid like $$G=\{ x \in \mathbb{R} : x = x_j = hj, \ j = 0,1,...,n,\ h=1/n\}.$$ And you write in ...
336 views

2k views

### How to Run MPI-3.0 in shared memory mode like OpenMP

I am parallelizing code to numerically solve a 5 Dimensional population balance model. Currently I have a very good MPICH2 parallelized code in FORTRAN but as we increase parameter values the arrays ...
178 views

545 views

### scale invariance for line-search and trust region algorithms

In Nocedal & Wright's book on Numerical Optimization, there is a statement in section 2.2 (page 27), "Generally speaking, it is easier to preserve scale invariance for line search algorithms than ...
190 views

92 views

### Reference request: theory regarding time evolution of closed loop 2D elastic shapes?

I am interested in approximating the time evolution of 2D curves. Here's an illustration: An issue that arises when naively making this approximation as illustrated above, is that as one increases ...
7k views

### Error in result of finite-difference approximation when refining

I have calculated the first derivative of following equation using Euler method (first order), Three point Finite Difference method (second order) and Four point Finite Difference method (third order)....
79 views

### Shifting points in fortran

Hello I am trying to shift points which have been previously generated in the square area. I am having a trouble with some additional conditions how they should have been shifted. ...
814 views

### About faster approximation of log(x)

I had written a code a while ago which attempted to calculate $log(x)$ without using library functions. Yesterday, I was reviewing the old code, and I tried to make it as fast as possible, (and ...
213 views

### Distance between points

I am wondering how can I solve following problem. Arrange randomly $n$ points inside a square of side $a$ under the condition that the distance between any two points may not be smaller than 1. I ...
395 views

### Error propagation in recurrence relation

I have a recurrence relation $$P_{n} = A_{n} P_{n-1} - B_{n}P_{n-2}$$ with given $P_{0}$ and $P_{1}$. Numerically, each $A_{n}$ and $B_{n}$ is calculated with some precision. The same applies to ...
275 views

### How to avoid overflow error in program that computes product of two numbers, such that when one is big enough to cause overflow, other is $0$?

Let us say that I have a function like so: def f(x): return g(x)*h(x) Now, g(x) and ...
402 views

### Monte Carlo Double Integration Implementation

Am implementing a monte carlo integration routine to compute this double integral in eqn 0.3 of page 2 of this paper 'Mobius energy of knots and unknots', Annals of Mathematics, http://www.math.ucsb....
48 views

### Resources exploring the problem of “volume exclusion”?

Consider the following situation: There are two boundaries -- one is denoted using grey lines, and the other is denoted using black lines. The boundaries are numerically represented using "vertices", ...
238 views

### matplotlib contourplot for $\log z$ in the Complex Plane $\mathbb{C}$

I tried using Python's matplotlib on the logarithm and here is what I got, a kind of starburst pattern. Since the angle jumps between $\theta = 0$ and $\theta = 2\pi$, contour assumes there is a ...
117 views

### Is this the correct procedure for calculating matrix spectrum?

I am not sure if my question is on topic but I have a piece of Fortran code that is used to perform successive over relaxation. Prior to performing successive over relaxation the author is calculating ...
228 views

### Trust-region Newton: implementation issue with Conjugate Gradient calculations

UPDATE: The problem turned out to be the step (refer penultimate paragraph below) where I was factoring out a small value from the vectors of the numerator and denominator and then computed dot ...
193 views

### Stability analysis for explicit time discretization in the Finite Element Method

I have been looking for stability analysis of general reaction-diffusion problems, of the form $\frac{\partial u}{\partial t}=\nabla\cdot D\nabla u-k\,u$ , to be solved using the standard Finite ...
63 views

### Need a smart way to numerically take residues in a multidimensional integral

I'm trying to do an integral of the form $\int_C f(u,v)$, where $C$ is a set of contours in $u$ and $v$. In particular, each variable's contour starts at $-\infty+i \epsilon$, goes around a branch ...