All Questions

Filter by
Sorted by
Tagged with
4
votes
2answers
407 views

LAPACK - singular matrices - what does the positive integer info mean?

please can you help me with my code - I use Lapack to solve complex matrix (quite biq) and do it in two steps: I call zgetrf (LU factorization) and then ...
3
votes
1answer
132 views

Modification of Levinson algorithm for hermitian toeplitz matrix

I have implemented Levinson algorithm for toeplitz matrix by book: Blahut "Fast algorithms for digital signal processing". Book said - modification of this algorithm for Hermitian matrices is simple ...
3
votes
1answer
1k views

How to use eigenvalue information to efficiently diagonalize matrices?

I apologize if this question in a more general form has been asked before. I have a tridiagonal Toeplitz matrix $K$, whose eigenvalues and eigenvectors are known analytically for any dimension $N$ [1]....
3
votes
3answers
699 views

Hash-like algorithm with “weighted” input

The title is not the best but since I have no clue what I'm actually searching I simply used something broad. I'm searching for a an algorithm, a class of algorithms or at least keywords I can use for ...
2
votes
2answers
172 views

Ways to speed up the computations

OK, I have a FORTRAN code which numerically integrates equations of motion for large data sets of initial conditions. I run this program in my PC and it requires about 1 day of computations per data ...
2
votes
1answer
100 views

How can I efficiently position the different segments of a large vector in Eigen C++?

I have a very large(up to 9 000 000) VectorXi vector defined in Eigen C++ which is read from a data file. The vector consists of 0, 1, 2, ...n segments with ...
4
votes
1answer
1k views

Solver suggestion for many small quadratic problem in C++

I have a C++ program/model that in some parts already use IPOPT (with ADOL-C and ColPack) to solve some pretty large non linear problems. Now in an other part of the program I need to solve a large ...
2
votes
1answer
69 views

Geographic distance between two regions

I am currently trying to calculate the geographic distance between two regions as I want to correlate it with their similarity of another aspect (e.g., similarity in word usage). Currently, I have ...
5
votes
0answers
210 views

Conjugate residual/gradient convergence checking in practice

Let's say we want to solve $Ax=b$ ($A$ symmetric positive /semi/definite) with the conjugate residual/gradient method. $A$ comes from FEM where the mesh is being refined. The exact solution is $x_*$ ...
1
vote
0answers
54 views

Calculating the number of molecules diffusing out of a volume [closed]

I have a system of reactions that are governed by differential equations. They are reacting inside of a volume with known dimensions i.e lbh. I don't have any other information on their position ...
1
vote
1answer
1k views

Convexity Check

I have the following optimization problem and I am trying to check for its convexity. link As per the definition of convexity, "a continuous twice differentiable function is convex ON a convex set, ...
8
votes
2answers
243 views

Gauss-Seidel, SOR in practice?

When I learned about SOR, it was mostly given as one of the first examples of iterative methods, and then later the iterative methods that I would end up using would be Krylov subspace methods. Are ...
4
votes
1answer
2k views

Python: Grid with step control ODE solver

I have a problem in physics formulated via an ODE. Now I like to solve it numerically using Pythons scipy.integrate and the therein complex_ode. I figured out how and it works but now I like to ...
12
votes
1answer
667 views

Using fixed point iteration to decouple a system of pde's

Suppose I had a boundary value problem: $$\frac{d^2u}{dx^2} + \frac{dv}{dx}=f \text{ in } \Omega$$ $$\frac{du}{dx} +\frac{d^2v}{dx^2} =g \text{ in } \Omega$$ $$u=h \text{ in } \partial\Omega$$ My ...
3
votes
1answer
2k views

Algorithm for solving an ODE with time-dependent parameter numerically

Would anyone please explain me what is the mathematical algorithm to solve a IVP system of ODE with a time-dependent parameter. e.g. ...
3
votes
2answers
2k views

How to plot orbit of binary star and calculate its orbital elements?

I have a set of dates, position angles ($\theta$) and angular separations ($\rho$) for visual binary star. For example: ...
0
votes
1answer
259 views

zero pressure gradient flat plate CFD++

I'm trying to perform a trasient simulation of a subsonin flow over a flat plate in CFD++. I want to impose a ramp profile on the velocity at the inlet, like for instance a smooth step, and look at ...
3
votes
0answers
652 views

Immersed boundary method

I'm trying to use immersed boundary method for the 3D flow problem (Navier-Stokes equations), but I'm maybe misunderstood something in this method. Main principles I took from this book. I use the ...
3
votes
2answers
561 views

Affect of approximating a non-differentiable function on optimisation of minimisation

I am looking at a problem of constrained minimization, where the function to be minimized contains the Heaviside function, and as such is not twice continuously differentiable. My question is what ...
4
votes
2answers
4k views

Number of equations and precision of SciPy's integrate.odeint()

Is there any reason why SciPy's integrate.odeint() should become less precise when the number of equations increase? I'm trying to solve these two sets of differential equations: $\frac{dy_1}{dx} = ...
3
votes
2answers
1k views

Workaround for BFGS with non simple constraints?

In one sentence (thanks to @Brian Borchers), I want to minimize the function f(x, y, ...), with gradient g(x, y, ...), subject to constraints that aren't given explicitly, but are defined by ...
2
votes
3answers
731 views

Sparse, underdetermined system of linear equations

I'm looking for an algorithm to solve the underdetermined system of linear equations $$\mathbf{A}\,\mathbf{x} = \mathbf{b}$$ with $\mathbf{A} \in \mathbb{R}^{n\times n}$, $\mathbf{b} \in \mathbb{R}^...
1
vote
0answers
188 views

Is it possible to generalize the two view Sampson error to multiple view cases in computer vision?

In multiple view geometry of computer vision, there is a geometric error called Sampson error which is very useful in the nonlinear estimation of fundamental matrix....
2
votes
2answers
6k views

Stop process from continuing until others have finished MPI

I am looping an array using MPI. The problem is, i think that some processes are moving onto their next iteration before other precesses have finished theirs. This is causing me problems because data ...
6
votes
1answer
1k views

Fit my data to Lissajous curve in Matlab

I'm acquiring data which looks like this: Theoretically it should be possible to fit it with a Lissajous curve, which is typically defined in the following way: $x = A \sin(a t + \delta)$, and $y = ...
1
vote
1answer
59 views

If the global minimum value of a nonconvex $C^{\infty} f: R^n\to R$ is known,can it be easier to find the global minimizer?

If the analytical form global minimum value of a nonconvex $C^{\infty} f:R^n\to R$ is already known, will it be easier to find its global minimizer $x^*\in R^n$?
10
votes
4answers
4k views

Memory efficient implementations of partial Singular Value Decompositions (SVD)

For model reduction, I want to compute the left singular vectors associated to the - say 20 - largest singular values of a matrix $A \in \mathbb R^{N,k}$, where $N\approx 10^6$ and $k\approx 10^3$. ...
2
votes
1answer
137 views

What is the more than 3rd order Taylor series approximation for a multi-variate function?

Suppose $f$ is a infinite continuously differentiable map: $R^n\to R$, and $x,x_0 \in R^n$, then we have the following second order Taylor expansion of $f(x)$ at $x_0$: $$f(x)\approx f(x_0)+(x-x_0)^T\...
1
vote
1answer
890 views

lapack singular matrix

I'd like to find a condition that allows me to determine if a matrix is invertible or not. naively, I computed the determinant to see if it was zero. but then I realized that even for very small ...
1
vote
2answers
1k views

finding wave function for anharmonic oscillator

I'd like to find the normalized ground state wavefunction for the anharmonic oscillator (Duffing) whose potential for which there is no analytic solution; an oscillator with a quartic potential, in ...
9
votes
1answer
263 views

Hybrid spatial schemes for CFD: any downside to blending versus switching?

Aside from extra computational cost due to having to compute both fluxes over a certain region, is there any downside to blend two flux evaluations for a hybrid scheme in a finite volume method? The ...
1
vote
1answer
175 views

A 2D static problem with known analytical solution

I am looking for a 2D static problem (i.e. planar stress/strain) with known analytical solution. The purpose for that is to verify my self-written code in matlab for solving 2D static problems. Any ...
10
votes
3answers
1k views

N-dimensional Delaunay Tesselation Software Libraries

I have a set of known points/nodes irregularly spaced in N-Dimensional space (N>=2), and I would like a way to generate the Delaunay triangulation of these points, and return the corresponding ...
5
votes
1answer
197 views

What is the correct way of performing numerical experiments on desktops?

Suppose I want to set up an experiment to measure the performance of some numerical code on a desktop machine running Linux/Windows/MacOS. What kind of environment should I arrange in order to get ...
27
votes
3answers
54k views

How should I install a Fortran compiler on a Mac? (OS X 10.x, x >= 4)

Related question: State of the Mac OS in Scientific Computing and HPC A significant number of software packages in computational science are written in Fortran, and Fortran isn't going away. A ...
2
votes
1answer
151 views

*GEMR2D documentation (scalapack)

Where can I find documentation for the P*GEMR2D routines in Fortran? I've found: Scalapack UG Undocumented related source Unanswered forum post
4
votes
2answers
168 views

Algorithm to find singularities of a log function

I have a numerical problem in which I need to find the values $\lambda$ for which the determinant of a matrix $A_\lambda$ is zero. (The solutions $\lambda$ will give the eigenvalues of an operator...) ...
2
votes
2answers
735 views

Cropping in Sparse Matrix

Let $A$ be an $M \times N$ sparse matrix stored in compressed column format, in a C-like programming environment. I am interested in the best solution to get a sub-matrix of $A$. In MATLAB notation, ...
2
votes
1answer
1k views

How to derive the functional for a given differential equation using the variational expression?

In the attached image, I want to understand how to arrive at the equation 2.5.1, i.e. the variational expression. The problem is defined as best as it could and the further derivation follows smoothly....
5
votes
0answers
87 views

How do I perform chebyshev interpolation from a to b with custom angle range?

Typically Chebyshev interpolation from $-1$ to $1$ with angle from $0$ to $\pi$: $\xi_j=\cos \left ({\pi j \over N}\right )$ $x_j=(1+\xi_j) * {L \over 2}$ $w$: $w_0=\pi/(2N)$ $w_{1,...,N-1}=\pi/(N)$...
4
votes
1answer
240 views

constrained minimization in N dimensions

I am looking to create an algorithm to minimize an N dimensional problem. I am unsure how to write it in its generic form, so I will show it in 1, 2 and 3 dimensions Minimize $ \sum_{i} x_i\left [ f\...
2
votes
1answer
570 views

How to implement the spectral decomposition of a symmetric dense matrix via Eigen C++

Spectral decomposition of symmetric matrix $A_{n\times n}$, specifically, $n=3$ find the orthogonal matrix $Q$ and diagonal matrix $\Lambda$ such that: $A=Q\Lambda Q^T$ How to implement such ...
2
votes
0answers
145 views

How to reduce RAM requirement in PETSC and SLEPCreading large binary matrices [closed]

I have two 50000 x 50000 binary matrices A and B for solving A*x=lambda*B*x eigenvalue problem. These matrices are sparse. I am trying to solve using PETSC and SLEPC. My memory requirement shoots off ...
6
votes
1answer
180 views

Support Vector Machines as Neural Nets?

This is more of a conceptual question. I have learned about Neural Nets, and I have some clue as to how Support Vector Machines work. I read somewhere however that given the appropriate kernel (is ...
12
votes
2answers
231 views

numerical integration in many variables

Let $\vec{x} = (x_1, x_2, \dots, x_n) \in [0,1]^n$ and $f(\vec{x}): [0,1]^n \to \mathbb{C}$ be a function in these variables. Is there a recursive scheme for this iterated integral? $$\int_{[0,1]^n}...
2
votes
1answer
110 views

Optimal algoritm of gcd with complexity

I want to know the best optimal algoritm of gcd with its complexity if you have a any useful source I will be glad to have a look at it.
1
vote
1answer
110 views

Practices to convert computer algorithms to matheamtical notations [closed]

First, an example: Given an image (2D array) to write down a mathematical notation for the function of pixelation, for example. Fig. 0: The pixelated version (right) of the given 2D array (left) ...
0
votes
1answer
69 views

SVM Math Question

I'm studying support vector machines and came across this paper. The following equation doesn't make sense to me, especially the part with the 0 ∀i. Any help understanding the basics of SVMs? yi * (...
2
votes
1answer
24k views

why Lapack routine dgesv doesn't solve this?

Suppose I have the following 3 by 3 matrix: p<-3 X<-matrix(1/p,p,p) --$\pmb X$ is just a $p$ by $p$ matrix where every entry is $1/p$. Now I want to solve ...
5
votes
0answers
85 views

Computing linear combinations of sines and cosines (phasors)

I have a finite series that looks like this: $f(t) = \sum^n_{i=0} A_i cos(\Theta_i + \omega_i t) + B_i sin(\Theta_i + \omega_i t)$ That is, a finite series of pairs of phasors. What's the state of ...

15 30 50 per page
1
158 159
160
161 162
195