instruction
stringlengths
43
28.1k
I would like to compute the inverse of some large block diagonal sparse matrix. The number of rows and columns is somewhat over 50,000. The blocks are 12 by 12 and are sparse (27 non zero elements). I tried to compute the inverse of the entire matrix (using solve). This was not possible, the entire matrix is too big. A...
Figure below depicts a cross section of a creek for which I am trying to measure the water flow for that section. What we have as inputs are a bunch of sample points on the river. For each sample points we measured the depth of creek at that point (e.g. h1, etc) the velocity of water at that point(e.g. v1) and the dist...
I'm currently working on this project and I have a basic structural analyzer that uses the finite element method. Essentially, I turn each block into a set of trusses, construct a stiffness matrix relating each truss's force to each other, and feed it into Matlab. The next task is for me to speed it up, ideally by usin...
Is it possible to find interior eigenvalues closer to some lambda using Davidson method? I was searching online but found that most people use Jacobi-Davidson method for that.
The problem is to find a 2nd order finite difference approximation of the partial derivative uxy, where u is a function of x and y. Page 5 of this pdf I found does a centered difference approximation it in two steps. It first does the 2nd order centered finite-difference approximation of one of the partials, and then i...
I've got some problems solving (numerically) this system of equations. \begin{array}{l} 40 \cdot \cos (2t) + 105 \cdot \cos ({\theta _3}) - 75 \cdot \cos ({\theta _4}) - 91.924 \cdot \cos ({337.62}) = 0\\ 40 \cdot \sin(2t) + 105 \cdot \sin({\theta _3}) - 75 \cdot \sin({\theta _4}) - 91.924 \cdot \sin({337.62}) = 0 \end...
As we know, computing the authority (or hub) score of HITS ranking method, means to use the following matrix equation: $$ \textbf{a}^{k}=A^T A\textbf{a}^{(k-1)} $$ and apply the power iteration method, but with significant problems: actually, AFAIK, the convergence in not guaranteed, for the matrix $A^T A$ is sometimes...
I would like to determine the theoretical number of FLOPs (Floating Point Operations) that my computer can do. Can someone please help me with this. (I would like to compare my computer to some supercomputers just to get an idea of the difference between them)
I want to solve the diffusion equation, i.e. $$ \dot{f} - f'' = 0 $$ with a boundary condition $f(0) = f(1) = 0$ and with an initial condition that $f$ is a boxcar function concentrated over some small region of size $d \ll 1$. The units are scaled so that the diffusion constant is equal to unity. Then I want to use t...
When using the dual mesh (vertex-centered) for finite volume methods, you end up with a cell center at the boundaries between materials. It is possible that the equations being solved in each material are different, or at the very least don't have continuous derivatives at the boundary (for example: poisson's equation...
What's the difference between these two methods? Can a problem be solved by one method will be able to solved by the other? Can both/or one of them be parallelized with OpenMP and/or MPI?
In a high-dimensional setting, say $d \gg 5$, what is a recommended way of evaluating a spherical integral of a smooth (non-symmetric) function $f(\mathbf{x})$? $ \int_\mathcal{S_r} f(\mathbf{x}) \mathrm{d}(\mathbf{x})$ where $\mathcal{S_r} = \{ \mathbf{x} \; | \; \|\mathbf{x}\|^2 = r \}$. I want to avoid Monte Carlo i...
I am looking for a routine (or set of routines) in the Intel MKL that that can replace dslucs (Incomplete LU BiConjugate Gradient Squared Ax=b Solver) in SLATEC (http://www.netlib.org/slatec/lin/).
I have a function $f(r,\theta,\phi)$ which I am expressing in terms of spherical harmonics $$ f(r,\theta,\phi) = \sum_{l=0}^{\infty} \sum_{m=-l}^{l} g_{l,m}(r) d_{l,m}(\theta,\phi) $$ where $d_{l,m}$ are real spherical harmonics (RSH - formula below taken from Wikipedia). \begin{align} d_{\ell m} &= \begin{cases} \disp...
I am trying to implement BFGS. The purpose is to approximate Hessian matrix only (not using the quasi-newton optimization steps), so i am using steepest ascent for optimization. What I observe is that the final Hessian approximate is very sensitive to the initial guess of Hessian. If I start with Identity matrix, most ...
I have multiple plane constraints in $\mathbb{R}^3$ of the form: $$n_i \cdot x \ge \delta_i$$ Where $n_i$ is the $i$th plane normal (in form (x, y, z)), $x$ is a point in space, and $\delta_i$ is the plane constant (distance of plane from origin). I want to find $x$ such that the above is satisfied and the distance fro...
Suppose: I have two domains, $\Omega_{1} = [0, 1/2] \times [0, 1]$ and $\Omega_{2} = [1/2, 1] \times [0, 1]$. The domains share an interface $\Gamma = \{1/2\} \times [0, 1] = \partial\Omega_{1} \cap \partial\Omega_{2}$. I mesh both domains in such a way that nodes and faces on the interface match up between the two me...
recently I have been working on solving some math problems using Fortran. There occurs to me that a linear matrix equation: $$ AX-XA=B $$ where $A$ and $B$ are known $n\times n$ matrices and $X$ is the one need to be solved. I know this looks like a typical Lyapunov equation. However, in order to solve this equation sp...
This is such a basic topic but there are so many different methods proposed for solving a linear system of equations. I recently found a very good source but couldn't really make sense of all the stuff it contains. If I had to pick only 5 methods that I should understand thoroughly for solving big systems of linear equ...
I am trying to solve an equation like $R(x) = 0$, using Newton-Raphson method. To obtain the $x$ increment in each iteration I solve $dx = -(A)^{-1}\cdot R$ where $A = dR/dx$. But the convergence criteria, here $||R||$ reduces to a certain amount, depending on the input, e.g. 1.e-8, and it remains so. After much trying...
I have an integral of the form $$ I(n) = \int_0^1 dx f(x) \cos(n \pi x) , $$ where $n$ is an integer. In other words, I calculate the cosine Fourier coefficients of function $f$, which is real and continuous on the interval. I need to calculate this for a large number of large values of $n$. Currently I'm just doing th...
I have a set of modified compressible Euler equations that I would like to solve using a WENO method. The issue is that the modified flux function involves derivative and filtering terms and I'm not sure how to compute the derivative terms in a consistent manner within the WENO scheme. For simplicity, the key aspects o...
This is originally a problem in programming, but since almost no one on Stackoverflow know how to solve this I went here instead; https://stackoverflow.com/questions/23003612/javascript-angular-velocity-by-vector-2d I want to convert X and Y velocities to angular velocity, this is the formula I am currently using to ca...
This is originally a problem in programming, but since almost no one on Stackoverflow know how to solve this I went here instead; https://stackoverflow.com/questions/23003612/javascript-angular-velocity-by-vector-2d I want to convert X and Y velocities to angular velocity, this is the formula I am currently using to ca...
While calculating the eccentric anomaly of a satellite using the Newton-Raphson method, what initial estimate of the root for E (eccentric anomaly) should be taken for least number of iterations(best approximation of root) to take place and why?
Consider the nonlinear system of equations $$ (1) \quad qk^2a_1^2E^2+wna_0a_1AE+pnka_0^2a_1E+rn^2a_0^2A^2-rn^2a_0^3A^2+qk^2a_0a_1ABE-qk^2na_0^2E^2=0, $$ $$ (2) \quad nwa_1^2AE+nwa_0a_1AB+2pnka_0a_1^2AE+2pnka_0^2a_1AB+2qk^2a_1^2ABE-qk^2na_1^2ABE-2qk^2na_0a_1AmE+qk^2na_0a_1AB^2+2rn^2a_0a_1A^2-3rn^2a_0^2a_1A^2=0, $$ $$ (3...
Let $A$ be a large symmetric positive definite matrix, and suppose that we can efficiently apply $A$ and have a fast solver to apply $A^{-1}$, but we do not have access to the matrix entries for either $A$ or $A^{-1}$. How can one use this to solve the system, $$\sqrt{A}x=b?$$ As suggested in this previous question, t...
I'm writing a Monte Carlo simulation in which I have to maintain a large collection of items. This collection contains a great many duplicates, and it will most likely be best to store some or all of these in the form of a number that records the number of duplicates, rather than storing each one individually. (The ite...
I've been reading a paper about using Matrix Completion for Photometric Stereo but I am having some troubles in section 2.2 trying to understand why irrespective of the number of pixels and the number of images $$rank(\mathbf{O}) = 3$$ where $\mathbf{O}$ is the matrix with the images linearized and stacked as column ve...
Consider the scalar PDE for $u$ with Dirichlet boundary conditions: $\mathrm{div}(\mathcal{K}\nabla u) = f\; \forall x\; \in \Omega \subset R^2$, $u = 0 \; \forall \; x\;\in \partial\Omega$ where $\mathcal{K} \in R^{2\times 2}$ is positive definite symmetric. For a start I assume $\Omega$ is the unit square with a u...
I am trying to solve 2D Poisson equations with Neumann boundary conditions. When the mesh is uniform, Poisson equation is singular and symmetric, so the method listed in Null Space Projection for Singular Systems works well. But when the mesh is non uniform and sharp immersed boundary method is implemented to treat the...
I will try to give the motivation behind this problem and later the math formality. Given a grayscale image (1 Channel - $M \times N$ Matrix). Someone marks some pixels as anchors. Now, you need to interpolate the other pixels (Which are not anchors) by minimizing a given cost function s.t. the end result is an image w...
A dense matrix is distributed for parallel computation column-wise, then multiplied from left & right by sparse matrices. What would be appropriate c++ libraries for these tasks?
Heres a couple of questions, 1) Does a CAS exist that can manipulate Cartesian based tensors and produce a simplified output that is hopefully in index notation? 2) If not, is there some indirect method to accomplish this? I'm talking about doing rather simple manipulations such as computing, $$ \nabla^{2}_{\mathbf{r}}...
TUCKER_ALS computes the best rank-(R1,R2,..,Rn) approximation of tensor X, according to the specified dimensions. I am using MATLAB Tensor Toolbox Version 2.5. I am wondering if I write a paper, how can I refer to the algorithm?
In one article I faced with such terms as sSVD, cSVD and oSVD. As I understand sSVD - standart SVD, cSVD - svd for block-circulant matrices, but I can't find what is oSVD. 1) What is oSVD? 2) Can anyone suggest me a few articles about cSVD, oSVD and their implementations?
According to a recommendation, this is a re-post of that. currently, I'm working on a way to compute the 2 biggest eigenvalues of a real, symmetric, huge and sparse matrix that changes a few entries from time to time. The problem should be solved using an algorithm, that does not compute solutions from scratch every ti...
I have a data mining assignment where I make a content-based image retrieval system. I have 20 images of 5 animals. So in total 100 images. My code returns the 10 most relevant images to an input image. Now I need to evaluate the performance of my system with a Precision-Recall curve. However, I do not understand the c...
Say I have an LP that is unfeasible and that I want to find the solution that makes it feasible without strongly violating the current constraints. What is a principled way of solving this problem, and how can I know a posteriori what constraints would have to be violated? I found the following example, but it is uncle...
I'm trying to construct the 12 x 12 beam element stiffness matrix from a section constitutive matrix (6 x 6 with shear stiffnesses, axial stiffness, bending stiffnesses and torsional stiffness on the diagonal). I can get a 6 x 6 beam element matrix as would be used in a multibody formulation using the method described ...
I am working on good retrieval mechanism for big data systems. I am of view that multidimensional structures could be of great use for aggregations and querying . Multidimensional structures as mentioned in theory/products could replace the need of OLAP CUBE. Here is some data size info residing into data-warehouse a...
I'm looking for an efficient way to solve a symmetric tridiagonal system $Mx = d$, where the upper and lower diagonals of $M$ are offset from the main diagonal by $k$ rows/columns: $$ \begin{bmatrix} {b_1 } & {0 } & \ldots & {0 } & {a_1 } & {0 } & \ldots & { 0} \\ {0 } & {b_2 } & {0 } & { } & {0...
I have to minimize a linear function with respect to variables u which take values [0,1] The number of variables can exceed 10,000 There are thousands of linear inequality constraints I need a solution which is good but does not have to be optimal. Are there any heuristic approaches for doing this ? For example I could...
In Latent Semantic Analysis one uses the SVD to perform a dimensional reduction of the term-document matrix, via the Eckart-Young theorem. Now, the rank $k$ approximation obtained by E-Y is proven to be the best approximation in the Euclidean norm as well as in the Frobenius norm. The whole literature I'm reading about...
I hope you can help me out with this. I have to find the solution x to an inverse system $$ x=A^{-1}b $$ This inverse problem is basically a least square problem with a rank-1 update. $$ x=[uv^{T}+H^{H}H]^{-1}H^{H}b $$ There are two objectives, one can be achieved with the least square problem and the other with the ...
Are there optimizers where it is possible to specify ordinal ranking of parameters? Assume that I have a function of three parameters $f(\theta_1, \theta_2, \theta_3)$. Are there optimizers such that I can specify $$ {\arg\min}_{\theta_1 > \theta_2 >\theta_3}f(\theta_1, \theta_2, \theta_3) $$ Assume that $f$ is smooth...
In numerical methods for ODE's, the model problem y' = cy where c is complex is regarded as sufficient in performing error analysis for different methods in solving ODE's. Is it sufficient, and why? In my opinion, it overlooks many potential functions that can have different error forms.
Minimize $\sum\limits_{i=1}^{10} L_{i}x_{i}$ subject to $Af=p$ and $x \geq|f|$. Here $L$, $p$ and $A$ are known, $f$ and $x$ unknown. $Af=p$ is underdetermined. Since $x$ is minimized when $|f|$ is minimized, I rewrote the problem putting $x = |f|$: Minimize $\sum\limits_{i=1}^{10} L_{i}|f_{i}|$ subject ...
I have the following equation I came across which was solved using least squares $x = \sum_{n=1}^{N} A_{n} y_{n}$ Where $x$ is a $m \times p$ matrix and $y$ would be of size $m \times p$ as well ,where $p=N$.Both $x$ and $y$ are known. $A_n$ are the weights to be computed for every $y_{n}$. How would one do a least squ...
Before I know how to do tucker decomposition, I mistakenly thought the core tensor is only from combining the singular value matrices of the flattening matrices. Yes I know it is not now. For the tucker decomposition method for a 3 way data's tensor decomposition, a core tensor is calculated using the original tensor(e...
I want to publish the software package I've written for my graduate work along with a paper describing the package. So far I've been considering liberal licenses such as BSD. However, I am now aware that publishing your code may involve an agreement to the journal's licensing terms (cmp. e.g. this question) or even tra...
For a hobby project I need to solve a series of quadratic programming problems each with about 500 variables about 1000 constraints, each of the form $x_i-x_j\le c_{ij}$ the objective function is the sum of about 300 terms of the form $w_{ij}^2(x_i-x_j+d_{ij})^2$ about a third of the variables are ignored by the objec...
I want to calculate the Wigner quasiprobability distribution function of a particular wavefunction. The definition suggests a few straightforward ways of calculating it, but I was wondering if there's something more efficient than the naive approaches of either directly evaluating the integral or taking the fft of the ...
I'm solving a system of nonlinear ODEs that take the form $Q_{nm} \ddot{y}_m + S_{nkl}\dot{y}_k\dot{y}_l +V_n = 0$ where Einstein summation is assumed, $y_i$ are the dependent (complex) variables, $Q_{nm}$,$S_{nkl}$ and $V_n$ are all low order polynomials in the dependent variables, $n =1,...,N$, with $N$ the $resolu...
I have 10000 variables (each of them is binary), vector of positive coefficients and a matrix $A$ ($10000\times10000$), if $A_{ij}=1$, then $i$th and $j$th variables can take 1 simultaneously, if it is 0, then it is not possible. The goal is to maximize their weighted sum. What algorithms and software could I use to so...
I have a 2D distribution of mass on a sphere given as a matrix of masses in latitude-longitude grid cells. I need these masses projected to another grid on the same sphere with different location of pole and different cell sizes, again as masses in grid cells. The projection has to be: fast monotonous, i.e. not creat...
I have a project where I need to use quadratic fields Specifically numbers of the form $a + b \sqrt{-3}$ with $a,b \in \mathbb{Q}$. For example here are the prime numbers in Eisenstein integers: I do not want to use sage. I would like to write my own data type to incorporate numpy. PARI would be useful - but it's ...
I'm trying to simulate a simple diffusion based on Fick's 2nd law. from pylab import * import numpy as np gridpoints = 128 def profile(x): range = 2. straggle = .1576 dose = 1 return dose/(sqrt(2*pi)*straggle)*exp(-(x-range)**2/2/straggle**2) x = linspace(0,4,gridpoints) nx = profile(x) dx = x[1] - x...
I'd like to distinguish different types of beers in my fridge using a Raspberry Pi. I saw a very good tutorial on Adafruit that utilized OpenCV for face recognition. Can these same face recognition algorithms, Eigenfaces & Fisherfaces, be used to train my raspberry pi for recognizing different types of beer cans?
I am using a python script to create wirebond interfaces in Ansys HFSS. Variables define the board, wirebond, and package geometry. To simulate a new wirebond, I just edit the geometry variables and run the script. My problem is, I have to use the computer with HFSS (and it's expensive license) just to verify the geom...
I am trying to implement QR factorization of a non-square matrix in FORTRAN. I have the algorithm for a square matrix but not for a non-square. I use Housholder matrices. Do you know where I could find the whole algorithm or code for the non-square case so that I can be sure I am doing it the right way (i am new in pr...
I have done a Fourier transformation of two signals (in time) $S_1(t),S_2(t)$ using numpy's fft which will give me $S_1(f),S_2(f)$. The corresponding frequency grid I get via fftfreq. In the frequency space, I then interpolated the two signals to a new grid using interp1d. I need to do this to match the two grids of th...
I am trying to teach myself some programming in C by doing the problems of project Euler. I am trying to find the largest prime factor of the number 600851475143 (Euler problem 3). I have written a code which successfully does this for numbers which are not too large: #include <stdio.h> int primearray(int,int); main()...
Question: I have problems with sidelobes when computing the convolution of two radially symmetric functions. I wonder whether I should just switch from second order to fourth order and refine the grid aggressively, or whether there are more appropriate methods for computing this convolution. I have radially symmetric...
I need help plotting the Heaviside function: Real analysis often involves constructing bizarre functions which are intuitively correct, but ultimately wrong. See the great book Counterexamples in Analysis. I wrote a numpy script to plot the function $\displaystyle \sum_{n=1}^\infty \frac{1}{n^2} H\left(x - \frac{1}{...
Previously, I have calculated energy spectrum for 3D DNS data obtained for isotropic turbulence which is equally spaced in all three directions and then to compute the energy spectrum, one performs Fourier transform and then accumulates energy located in different wavenumber bins and then gets the ($k^{-5/3}$) slope an...
I am looking for an algorithm that I can apply for a random tessellation of polygons with different areas. The algorithm can relax the geometry of the polygons to a condition that all of them would have the same area! Someone should have faced this problem. The simplest case is that all the polygons have the same numbe...
I want to impose symmetry plane boundary condition for a solid mechanics problem. I googled around and found out that in many places people say to "forbid displacemnts out of symmentry plane and forbid rotations about any axis lying in this plane if you have rotational degrees of freedom". If I have only disps degrees...
I am wondering if the Thomas algorithm is the fastest way (provably?) to solve a symmetric diagonally dominate sparse tridiagonal system in terms of algorithmic complexity (not looking for implementation packages like LAPACK etc). I know that both the Thomas algorithm and multigrid are $O(n)$ complexity, but maybe the ...
I am going through this example problem (picture below) and working it out myself. The problem is that I do not get the same mass matrix (M) as the example problem. I am able to get the same stiffness matrix (K). I used the same process of obtaining the stiffness matrix, which uses the connectivity array, but do not...
I am trying to solve a small QP problem in CPLEX. The problem has several linear constraints. The optimiser runs and finds a solution which satisfies these constraints and CPLEX returns a success code. However the value of the objective function given by this solution is greater than that for the solution if I just su...
We am currently working on a project related to computational optimization, in which I have tasked myself with calculating the most efficient solution to one of the game's levels. Link to the flash game: http://trackmill.com/virus-2/ The hexagon grid is randomized in color, and the player starts out in one of the corne...
I wrote a script that plots the results of the "drunken lamppost" problem in MATLAB. Now I need to create a road-width from -3 to +3, length from 0 to infinity but the drunk can walk just ahead. It means that when he reaches the road's edge MATLAB will automatically stop plotting. My code is here: r=[0 0]; for t= 0...
I am submitting jobs to Open Science Grid from a glidein-wms enabled submit hosts such as osg-xsede. I'd like to stage some data on SE nearest to osg-xsede submit host, then distribute data to various SEs available at each destination clusters (more or less as a cache), and access the data on each SE from the worker no...
I have a mathematical program with a constraint involving a maximum function. More specifically, the constraint is: $y = \max\{a_i x_i:1 \leq i \leq n\}$ where $a_i$ are constants and $x_i$ are binary variables. Can we express this constraint as a linear constraint?
Which one is better: FORTRAN or Python? And I guess that in both cases you need Gnuplot, am I right? I'm working on a Windows machine at the moment. I'd like to use it to get numerical solutions for physics-problems, including Monte-Carlo simulations, numerical integration and differentiation, molecular dynamics, etc. ...
I have dense complex matrices $M(z)$ in which each element $M_{ij} = M_{ij}(z)$ depends on a complex parameter $z$. I need to find $z$ such that the matrix $M$ gets singular, i.e. I am looking for null vectors $\vec v$ which satisfy $M(z) \vec k = \vec 0$. So far, I use a Newton method. As the wanted $M(z)$ is singular...
I am trying to simulate a moving airfoil with constant speed (Mach=0.755, aoa=1.25). I solve Euler equations with Roe's method. I have two boundary conditions: Farfield Slip wall (airfoil) For all faces I gave face velocities as: vbx = -Mach cos (aoa) vby = -Mach sin (aoa) At the farfield, I set (rho,u,v,p) = (1, 0, ...
The problem comes from the need to estimate the error propagation of the spectral norm computation of a square matrix $A$ of which I know the components' $A_{ij}$ absolute error. The fundamental step of the computation of the spectral norm $||A||_2$ is the computation of the largest eigenvalue of the matrix $A^TA$. In...
My problem deals with a large $n \times m$ matrix from which I extract and store several square $k \times k$ submatrices. The original matrix may be very large, and I may need to store many thousands of different $k \times k$ submatrices. All I need to store is two list of integers, the indices for both rows and column...
I would like to import (or parse ??) a WRL/VRML file format in python in order to work the data with Matplotlib. Is there any way of converting this file format into plottable numpy arrays ? I attached a photo a WRL file visualized with the FreeWRL viewer
I know the Neumann B.C. is implicit in FEM language. However, I have seen at least two ways to impose Dirichlet B.C. e.g. for the following problem 1D, $$\nabla^2 u + \nabla u= 0, u_{left}= 1, u_{right}=0$$ 1) set first and last row of assembled "A" to "0" at left hand side, set A(1,1)=1,A(end,end)=1, and specify the b...
I have used FEA for a couple of years now, but using it and using it correctly are two different things, safety factor is not the solution to everything. I have the feeling I won't be using it right unless I have a clear answer to that question: I am aware elements must be close to their ideal shape (based on the Jacob...
I'm trying to work out an as-general-as-possible 2D Laplace example for Finite Element Analysis. Starting from $\Delta u = 0$ for an unknown $u(x,y)$, I multiply both sides (well, in practice only the left-hand side) by an arbitrary test function $\varphi(x,y)$ and subsequently integrate over the domain $\Omega$. Then,...
Recently I started to get interested in GPU-computing. I am considering buying a GPU and am inclined to buy an NVIDIA GPU since this allows for coding in both OpenCL and CUDA. But is NVIDIA really the best brand and if so, what type of GPU should I consider buying. I am not looking for a high-end GPU, but for good valu...
I am trying to solve Boltzmann eqn: $\frac{e}{m}\tau\vec{E}_x\cdot \nabla_\vec{v}{f(\vec{v})}=f(\vec{v})-f_0(\vec{v})$ where $f_0(v)=\exp{\frac{-m \vec{v}^2}{T}}$ and $\vec{v}=\{\vec{v}_x,\vec{v}_y\}$ (i.e., $\vec{v}$ is in 2D.) For simplicity, let's assume $\vec{v}_y=0$. Assume $\tau$ and $T$ are constants. Th...
I want to write mathematical optimization software. At university, they taught me how to use AMPL+CPLEX/SCIP/MINOS/Couenne etc.. and that was good enough. But I cannot afford the cost of AMPL for my personal use and I don't want to have any limitation in the size of the problem. Is there any real free alternative to A...
I've been reading Larson and Bengzon's recent book on finite element methods, which has been good for getting an understanding of basic theory and computational procedures. The finite element book by Brenner and Scott has been recommended strongly by a number of people as a book for understanding more of the theory beh...
I am currently solving a Non Linear modell in GAMS and I am interested in a sensitivity analysis of the results. When working with a linear program I am able to look at the marginal values for the constraints (a marginal value of 100 means that if the constraint is relaxed by one unit then my objective will increase wi...
I am trying to find out the magnitude of the acceleration of my object based on non-uniformly sampled 3D position data. I'm using the standard approximation of the 2nd order derivative on a non-uniform grid (see e.g. here, page 121): $$ f'' \approx 2 \cdot\frac{h^+ f_0 - (h^- + h^+) f_1 + h^- f_2}{h^+ h^- (h^+ + h^-)}...
We use Armadillo a lot in our code but there are places where we prefer to use MKL directly from Vector Math Library. We have cx_vec i.e. vector of doubles. But the exp function of armadillo uses std::exp which is not great so we started using MKL for it. The problem comes when converting cx_vec into MKL_Complex16 arra...
I'm trying to implement PageRank. I'm reading the description here: http://nlp.stanford.edu/IR-book/html/htmledition/markov-chains-1.html Everything is very clear to me, however I'm concerned about the construction of the matrix $P$. I find that constructing $P$ the naive way would be very expensive. For example: to i...
I will have to solve a large linear system. I'm now looking for a solver that works "matrix-free" (So that I just have to specify a matrix-vector product, but not the matrix). As far as I understand (I'm not an expert.) LAPACK does not provide this option. Can you recommend any libraries? Or is my approach to implement...
I'm following the book here to compute PageRank: http://nlp.stanford.edu/IR-book/html/htmledition/markov-chains-1.html I built the transition matrix P as indicated in the book. Then I computed the PageRank scores by raising the transition matrix P to higher powers, as said in the book. To make sure my computations are ...
The Problem Domain I have a number of network-connected PCs. I want to be able to simulate and replicate the same simple fluid dynamics simulation (E.g. Navier-Stokes), in real-time, between them. That is to say, the same body of fluid will be simulated at the same time in isolation on each PC. They will all have the s...
I have to solve for x in b = A*x, where a is sparse. This works fine with Matlab's mldivide: x = A \ b. Since I will have to use an iterative algorithm for very large A, I'm currently testing Matlab's iterative algorithms, bicgstab in particular: [L, U] = ilu(A, struct('type', 'ilutp', 'droptol', 0.0000001, 'udiag', 0)...
I want to solve the Poisson equation for a 2D polar system: $$\Delta_r f(r) = u(r)$$ with the Laplace operator: $ \Delta_r f(r) = \frac{1}{r}\frac{\partial}{\partial r} \left[r \frac{\partial}{\partial r} f(r) \right] $ I have $u(r)$ given as a vector for a non-uniform (quasi-logarithmic) grid. Any ideas how to solve ...
I am not a biologist. But highly motivated by the recent advancements and problems in modern biology. I have been shortlisted for a PhD(computational biology programme at IMSc, Madras) interview in first week of June. My background is electronics and communication engineering. But prior biology knowledge is not requir...
In one step of image evaluations I need to apply a gaussian blur to pixel data. I do this by folding each pixel with a gaussian folding matrix. This is no problem unless I try to do this with pixels at the border of the image since for example on the left border I can't include the pixels to the left in my folding calc...
Could someone tell, please, has someone constructed finite difference mixed derivatives on quadrilateral (non-orthogonal) grids, already? Without using aconformal mapping to an orthogonal grid. I mean we have the mixed differential operator and try to represent it through a difference relation. I searched with the help...