All Questions

Filter by
Sorted by
Tagged with
2
votes
1answer
92 views

Cholesky Algorithm loop-Carried

I would like to know how to unroll loop-carried dependency inside the cholesky algorithm. What are the techniques that I should know to accomplish this work? I need to know it because I want to ...
2
votes
3answers
2k views

Scalar vs. vector potential for magnetostatics

When trying to solve a magneto-static boundary-value problem (BVP) ($\nabla \times \mathbf{H} = \mathbf{J}$ and $\nabla \cdot \mathbf{B} = 0$), one can use either the magnetic vector potential $\...
0
votes
1answer
70 views

Thermoplastic Equation solving

I was given a problem by my professor as follows Solve the System $pV=S$ $pcT=kT+BS\frac{dG}{dt}$ $\frac{dS}{dt}=\mu(V-\frac{dG}{dt})$ $\frac{dG}{dt}=f(S,T)$ Where $p$, $c$, $B$, $\mu$ are ...
2
votes
1answer
263 views

Reshape and Index (State) Products in Numpy

Consider the following: I start with a $2\times 2$ matrix $W_{ij}$. I then take this $W$ matrix and make a new tensor, $T$, by doing the following: $$ T_{ijkl}=\sum_{a}W_{ai}W_{aj}W_{ak}W_{al} $$ ...
11
votes
1answer
246 views

Are there Improved ways of computing $p \log(p)$?

Most math libraries have a number of versions of logarithm functions. Most of the time we assume them to be perfect, but actually quite a lot of them just offer a certain number of digits of precision....
2
votes
2answers
3k views

Implementing PageRank using the Power Method

I am trying to implement the PageRank algorithm described in this paper (Fig. 1). Here is the breakdown of the steps: http://www.louismullie.com/algo.png where: ...
6
votes
2answers
2k views

Need for quad precision in scientific computing?

Even if quad precision is not directly supported by most CPUs, many Compilers (GNU, Intel) support them. Also some software packages allow to compile with quad precision, e.g. PETSc. But is there ...
2
votes
0answers
105 views

Resampling of values between body fitted and cartesian grids

Assuming there exist two 2D grids on the same domain, one of them is a cartesian one while the other is curvilinear (body fitted regular grid, with curved coordinate lines). I am looking for a way to ...
4
votes
2answers
279 views

What does fundamental solutions stand for in boundary element method?

I gain some introductory knowledge from the materials I read. I feel Ok with the numerical implementation part of boundary element method when the integral equation has been formulated. But the ...
6
votes
4answers
2k views

how to test convergence of the solution vector

I am using some finite difference algorithm to solve the problem of a parabolic equation. Reading the Leveque's book on finite differences he suggests to test convergence of the method by considering ...
6
votes
2answers
4k views

Piecewise polynomial interpolation: Hermite vs Lagrange

I am a bit confused of the qualitative behavior of the two methods. Consider quadratic case, start by having points $x_i$, where I know the value and points $y_j$, where the values to be found. If I ...
3
votes
1answer
82 views

Randomly choose among N alternatives

I understand how to generate a random sequence of binary variables where 1 occurs with probability p and ...
6
votes
2answers
4k views

Deriving the element stiffness matrix for 2D linear elasticity

I'm following the derivation from Finite Element Method using Matlab 2nd Edition, pg 311-315, which derives of the local stiffness matrix for planar isotropic linear elasticity as follows: Force ...
9
votes
4answers
489 views

Hosting site for a small scientific library

For my research work I have been developing a small C++ library aimed at facilitating the communication between C++ computational codes and Octave/Matlab (when the latter is used for post-processing ...
1
vote
1answer
104 views

What kinds of maths to learn for understanding dynamical systems in cognitive science? [closed]

A current trend in cognitive science is to view the mind as a dynamical system (e.g., Continuity of Mind by Spivey, in which cognition is understood as a "continuous and often recurrent trajectory ...
4
votes
2answers
976 views

Should the discrete $L^{\infty}$ norm error increase as the mesh refines?

I'm working on an finite element code to solve the boundary value problem: $$-\frac{d}{dx}\left[ k \frac{du}{dx} \right] = f $$ $$u(0)=u(1)=0$$ The matlab code is available here. I'm testing this ...
4
votes
3answers
1k views

CPU benchmarks for numerical kernels

CPU benchmarks available online mostly focus on desktop apps/games and rarely on serial/parallel numerical kernels, specially sparse ones (e.g., MatMult). Some benchmarks like NAS/SciMark exists but ...
13
votes
3answers
5k views

Memory usage in fortran when using an array of derived type with pointer

In this sample program I'm doing the same thing (at least I think so) in two different ways. I'm running this on my Linux pc and monitoring the memory usage with top. Using gfortran I find that in the ...
6
votes
1answer
158 views

Computing flux of vector field numerically with regular grids

I would like to compute the flow rate (mL/s) of a pipe flow given the 3D velocity field $\mathbf{v} = (v_x, v_y, v_z)$ over the computational domain (a curved pipe). The field is represented in the ...
4
votes
2answers
172 views

Reaction-diffusion system animation

I'm using following code to generate a picture of the reaction-diffusion process: Explicit Euler method too slow for reaction-diffusion problem I would like to obtain an animation effect. When I ...
6
votes
1answer
344 views

Ray casting algorithm for multiple disjoint polygons is still valid?

We're dealing with country borders, that is the set of multiple disjoint domains that is made of polygons. To extract the different point on the map by a given country we've been said to implement ...
5
votes
1answer
62 views

Minimal point of a intersection of $n$ convex sets is always the minimal point of the intersection of two convex sets?

I have the intuition that the minimal point (in the sense of having the lowest value in one of the Euclidean space dimensions) of a intersection of $n$ convex sets is always the minimal point of the ...
9
votes
1answer
762 views

Matlab Pde Toolbox: Plot solution on a line or on a submanifold

I'm using the Matlab pde toolbox to solve a certain elliptic equation in 2D. Solution is fine, although I do need to plot it along a given line, i.e. to cut a planar slice from the 3D mesh ...
8
votes
2answers
2k views

Large array in GMP

If I want to use large array say mpz_t A[100000], I got "Segmentation fault (core dumped)" during my compilation. Is there any easier way to solve this?
4
votes
1answer
175 views

Expectation-Maximization and local maxima

The E-M algorithm does not guarantee convergence to global maxima. Following Applet shows this nicely: http://www.cs.cmu.edu/~alad/em/ Is it possible to generate data set, that guarantees reaching ...
4
votes
1answer
53 views

Configuration shift for determination of a true dimensionality

What would then be the way to determine a true dimensionality of a configuration of points $X\in\mathbb{R}^{n\times k}$ based on its Gram matrix $G=XX^T$? The "true" dimensionality refers to the ...
3
votes
2answers
3k views

An eigenvalue algorithm to solve constrained quadratic form minimization

I have a quadratic form $\mathbf{x}^T A \mathbf{x}$ (where $A\in \mathbb{R}^{n\times n}$ is symmetric matrix and $\mathbf{x}\in \mathbb{R}^n$) that I want to minimize given the normalization ...
15
votes
1answer
777 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 ...
1
vote
2answers
158 views

Affecting the rank of a Gram matrix by configuration shift

Let certain configuration of $n$ points exist in $d-$dimensional space, $X\in\mathbb{R}^{n\times d}$, $d<<n$. Also, let the corresponding Gram matrix be defined as $G=XX^T$. Since $X$ exists in ...
8
votes
1answer
565 views

Using algebraic multigrid for preconditioning convection-diffusion operators

I implemented a Navier Stokes based on FEM discretization and PETSc for solving the linear system of equations. To create an efficient solution procedure, I follow the paper "Efficient preconditioning ...
12
votes
4answers
407 views

Arbitrary Accuracy Scalable Rope Simulation

I am trying to simulate a rope object. The formulation I understand is an array of particles, connected by springs. These springs have very large k-values, so that the line deforms, but stretches ...
4
votes
1answer
493 views

code for surface advection (e.g. level set advection)

I have a 2D surface in 3D that I want to advect under a velocity field. More precisely, I have a surface $S$ and a velocity field $v$ and I want to advect $S$ under $v$ using the flow map of $v$, i.e....
6
votes
2answers
271 views

Krylov subspace iterative methods in floating point arithmetic

Is there any work that considers Krylov subspace iterative methods in floating point arithmetic? I'm especially interested in how rounding errors influence the convergence and the accuracy of the ...
8
votes
1answer
2k views

How to get sparse complex matrices from my code to PETSc efficiently

What is the most efficient way to get a complex sparse matrix from my Fortran code to PETSc? I understand that this is problem dependent, so I tried to give as many relevant details as possible below. ...
2
votes
2answers
82 views

Estimate (non-)drift in noisy data

I have a time series representing the result of a complex calculation (physical simulation). Due to round-off errors and approximation errors, there will be some "noise" on the data series. In some ...
7
votes
2answers
523 views

Numerical Green functions for a nonlinear wave equation

I am trying to put down some code to get numerically the solution of the following PDE: $$ \partial^2_t\phi-\partial^2_x\phi+\lambda\phi^3=\delta(x)\delta(t). $$ Of course, there are several ...
8
votes
3answers
4k views

fmincg implementation in Python

I'm trying to re-implement Neural Networks in Python. I implemented the cost function and the backpropagation algorithm correctly. I have checked them by executing its Octave equivalent code. But ...
18
votes
1answer
368 views

Catastrophic cancellation in logsum

I'm trying to implement the following function in double-precision floating point with low relative error: $$\mathrm{logsum}(x,y) = \log(\exp(x) + \exp(y))$$ This is used extensively in statistical ...
9
votes
3answers
4k views

Fastest algorithm to compute the condition number of a large matrix in Matlab/Octave

From the definition of condition number it seems that a matrix inversion is needed to compute it, I'm wondering if for a generic square matrix (or better if symmetric positive definite) is possible to ...
9
votes
2answers
4k views

How to remove Rigid Body Motions in Linear Elasticity?

I want to solve $K u = b$ where $K$ is my stiffness matrix. However some constraints may be missing an therefore some rigid body motion may be still present in the system (due to eigenvalue zero). ...
12
votes
1answer
463 views

Algorithms for Large Sparse Integer Matrices

I'm looking for a library that performs matrix operations on large sparse matrices w/o sacrificing numerical stability. Matrices will be 1000+ by 1000+ and values of the matrix will be between 0 and ...
8
votes
2answers
558 views

Helmholtz and Biharmonic equation examples with exact solution

I'm looking for examples of Helmholtz and Biharmonic equations in Cartesian co-ordinates with exact solutions, in order to compare my numerical solutions with it. I was able to find quite a few ...
4
votes
1answer
2k views

Why does MATLAB's quadprog outperform MOSEK for my problem?

For a problem I am trying to solve it appears MOSEK's Quadratic Program solver is 100 times slower than MATLAB's Interior Point solver. Has anyone encountered this behavior in the past, or maybe ...
4
votes
2answers
247 views

Does right-hand side influence convergence rate of a Krlylov supspace method?

Consider general system $Ax=b$. Does convergence of the Krylov subspace methods depend on actual vector $b$ assuming initial guess is zero? I mean such factors as locality of the source (with the ...
6
votes
2answers
418 views

FEM toolbox for discretization of higher order PDEs

Is there any (open source) FEM toolbox that allows the direct discretization of higher order PDEs without the need to split them up into systems of second order?
2
votes
2answers
1k views

Quadratic program With Linear Constraint vs. Eigen Decomposition Time Complexity-Comparison. Which is faster?

Say I had the choice of choosing one out of the following two optimization problems which I could use to solve my problem. Which choice is the fastest? How much of a trade-off would it be-as in - Is ...
2
votes
2answers
127 views

efficient mean of solving constrained OLS problems?

I was wondering whether there was a efficient procedure for solving constrained quadratic approximations of the form: $$\underset{k\in \mathbb{R}}{\min}\;||x_i-kx_0||_2$$ for fixed values of $x_0,...
9
votes
4answers
2k views

Fourier pseudo-spectral method and numerical dissipation

Performing a direct numerical simulation of isotropic turbulence with Fourier pseudo-spectral method (Orzag & Patterson, PRL, 1972) using FFT. For a background of the method, which is widely used ...
3
votes
1answer
197 views

How do you formulate the linear least-squares method for radiometric calibration?

In Debevec and Malik (mentioned similarly in Forsyth and Ponce's Computer Vision: A Modern Approach) they highlight a method of solving the camera response function using linear least-squares. We ...
5
votes
1answer
58 views

correct complexity notation

I have written an algorithm where the 2 input arguments are a file and a list of values. I would like to say the algorithm complexity is: ...

15 30 50 per page
1 148 149 150 151 152 170