instruction
stringlengths
43
28.1k
This question is related to recently posted one, but I guess it deserves a separate attention. Suppose a symmetric matrix $L\in\mathbb{R}^{n\times n}$ is given, and a rectangular matrix $A\in\mathbb{R}^{n\times m}$, $m<n$. A solution to the system $$LAx=b, \tag 1$$ is sought, for known $b\in\mathbb{R}^n$ and unknown $x...
CVXOPT: http://abel.ee.ucla.edu/cvxopt/index.html OpenOpt: http://openopt.org/Welcome What's the relation between them? What are the advantages/disadvantages of them, respectively? BTW, is there any other high quality general purpose convex optimization library for Python/C++ worth noting?
I'm working on modeling two phase immiscible flow in a porous medium. When I setup the system of equations, I obtain a non-linear system of equations that can be expressed in the form: $A(x)x=b$ where the matrix $A(x)$ is a function of the unknown $x$. I know that I can use Newton's method to solve this system, but...
What is the state of the art way of implementing double precision special functions? I need the following integral: $$ F_m(t) = \int_0^1 u^{2m} e^{-tu^2} d u = {\gamma(m+{1\over 2}, t)\over 2 t^{m+{1\over 2}}} $$ for $m=0, 1, 2, ...$ and $t>0$, which can be written in terms of the lower incomplete gamma fun...
Recently I am taking advantage of the ode45, as well as ode23s, ode15s solvers in Matlab to find numerical solutions of a system of dynamic equations (differential equations) which are developed by Lagrange method. However, it is hard for me to get a result even though I have run the program using ode45 as long as 8 ho...
There is a class of stiff initial value problems for ODEs that have small Lipschitz constants, slowly-changing solutions, but very long interval of integration. The only practical example of such a problem that I am aware of is the Becker-Döring equation from Hairer and Wanner's book. Are there any other interesting ex...
I remember seeing in the book by Kreiss "Time-dependent partial differential equations and their numerical solution" that if some elliptic differential operator satisfies $$(Lu,u)\leq K(u.u)$$ for the equation $u_t=Lu+f$ with some boundary condition then it can be shown that, the equation is stable, that is continuousl...
I have a numerical function f(x, y) returning a double floating point number that implements some formula and I want to check that it is correct against analytic expressions for all combination of the parameters x and y that I am interested in. What is the proper way to compare the computed and analytical floating poin...
I wonder what relation and difference are between combinatorial optimization and discrete optimization? Thanks! Originally by reading Wikipedia, I thought discrete optimization consists of combinatorial optimization and integer optimization, where the combinatorial one is to search over a finite set of solutions, and ...
I am using a program that utilizes the PARDISO solver as part of the Intel math kernel library. I am currently in the process of deciding on a new computer to run the simulations on. I have a question or two on how benchmarks with the program will transfer across systems. My current machine runs older dual quad-core ...
I implemented downhill simplex simulated annealing algorithm. Algorithm is very hard to tune, w.r.t. parameters including cooling schedule, starting temperature... My first question is about convergence. In general, independently from choice of initial parameters, is it sure that algorithm converges to global optimal ...
I have been reading Numerical recipes about how to create a power series approximation to a function once you have a Chebyshev approximation to the function. However it is still very unclear to me how one can go from the coefficients $c_k$ in $\Sigma c_k T_k - c_0/2 $ to the $d_k$ in $\Sigma d_k x_k$. I understand jus...
I'm working on a problem given in Nocedal & Wright's Numerical Optimization 2nd Edition, pg 303 Exercise 11.7: Consider a line-search newton method in which the step length $\alpha_k$ is chosen to be the exact minimizer of the merit function $f(\cdot)$; that is, $$\alpha_k = argmin_\alpha [f(x_k-\alpha J^{-1}(x_...
For the numerical solution of Reynolds equations (a non-linear partial differential equation), the Newton-Raphson method is generally proposed. After getting algebraic equations from a finite difference discretization, the Newton-Raphson method is applied to those non-linear algebraic equations. This yields a square sy...
I'm attempting to implement some code that moves particles and then calculated the acceptance/rejection of the move, but I'm stuck in a rut. Here is my Python code: def VMC(WF,numSteps): seed=5 ### my random number seed EnergyList=[] R=numpy.zeros((2,3),float) movesAttempted=0.0 movesAc...
I was checking partitioning capabilities of Metis (mpmetis) when I noticed, that it leaves two single nodes. I have marked them in red Have you seen something similar or maybe it is my mistake? The entire mesh Elements are typical, 8-nodal quadrilaterals. I used mpmetis without any options to create 2 partitions. It...
In my c language program, I have to store multiple dense $m\times m$ matrices corresponding to gridpoints $x_i$ with $i=1,...,n$. I decided to create a three dimensional array $A\in R^{n\times m\times m}$ as follows: double ****A; A=(double****)malloc(sizeof(double***)*n); for (i=0; i<n; i++) { A[i]=(double**...
I'm working on solving the coupled one-dimensional poroelasticity equations (biot's model), given as: $$-(\lambda+ 2\mu) \frac{\partial^2 u}{\partial x^2} + \frac{\partial p}{\partial x} = 0$$ $$\frac{\partial}{\partial t} \left[ \gamma p + \frac{\partial u}{\partial x}\right] -\frac{\kappa}{\eta}\left[\frac{\partial^2...
Possible Duplicate: Linear programming boundedness Consider the following LP: $\max$ $\sum_{i=1}^N b_i \pi_i$ s.t. $\;\;$ $\pi_i-\pi_j\leq 1 $ $\quad$ for each $(i,j) \in \tilde{A}$ $\sum_{i=1}^N a_s^i \pi_i \leq 1$ for each $s \in S$ This LP is always feasible, since zero is a feasible solution. Now, in orde...
I am using a stable version of SQP algorithm from a lib. Parameters setting is left to the developer, althought default values are at hands. I launch solver on very simple optimization problems s.a. $\min{( p_{1} * \exp^{ (p_{2} * x)})}$ $s.t. 0 \leq p_{1}, p_{2} \leq 10$ I feed optimization with a well chosen in...
To compute the eigenvector corresponding to dominant eigenvalue of a symmetric matrix $A\in\mathbb{R}^{n\times n}$, one used Power Iteration, i.e., given some random initialization, $u_1\in\mathbb{R}^n$, one iteratively computes $$u_1\leftarrow Au_1,$$after which a normalization is applied to $u_1$. Now, suppose that e...
what is your preferred test set to test quality of non linear solver? this could be set of data, model and results obtained with some benchmark solver, or simply a panel of test functions that could be used to generate synthetic data. thanks!
We would like to reach Molecular Dynamics simulation of proteins with around 20000 atoms in explicit water with trajectories of around 1 microsecond each. We are looking at different options for computer resources to complete these simulations. Since we (in Europe) can not apply for supercomputing time in Anton (from D...
Let $X\in\mathbb{R}^{n\times p}$ denote a matrix with $p$ linearly-independent columns, and let $L\in\mathbb{R}^{n\times n}$ denote a symmetric matrix. Furthermore, let $D\in\mathbb{R}^{n\times n}$ denote a diagonal matrix with positive-entries. Now suppose that we are interested in computing solutions to the symmetri...
Is there a preferred way how to implement a fast (approximate) evaluation of the Chebyshev interpolation polynomial on uniform grid (given the function values at the Chebyshev nodes)? My problem is that the interpolation becomes slow when the degree of the interpolating polynomial increases. The following ideas came to...
I am looking for some open source implementation (any of Python, C, C++, Fortran is fine) of rational approximation to a function. Something along the article [1]. I give it a function and it gives me back two polynomials, whose ratio is the approximation on the given interval and the error is oscillating with the same...
I want to solve a non-linear problem with non-linear equality constrains and I'm using a augmented Lagrangian with a penalty regularization term that, as well known, spoils the condition number of my linearized systems (at each Newton iteration I mean). The bigger the penalty term, the worse the condition number is. Wo...
Most of my programming is one-off research codes in C for my own use. I have never distributed any code to other than close collaborators. I have developed an algorithm that I am publishing in a scientific journal. I want to provide the source code and perhaps executable code in the online supplement to the article. A ...
I wonder what has happened to polynomial preconditioners. I am interested in them, because they appear to be comparatively elegant from a mathematical perspective, but as far as I have read in surveys on krylov methods, they generally perform very poor as preconditioners. In the words of Saad and van der Host, "Current...
A Poisson equation with all Neumann boundary conditions has a single constant dimensional null space. When solving via a Krylov method, the null space can be removed either by subtracting the mean of the solution each iteration or by pinning the value of a single vertex. Pinning a single vertex has the benefit of simp...
What is the best tool to sample rotamers in side chain amino acids in a protein? More exactly, I want to sample the different rotamers only for lysine residues while keeping backbone rigid. I've tried to use the fixed backbone design application ("fixbb") in Rosetta3.4 but this program give only one (optimized?) soluti...
CG may be used to estimate the extremal eigenvalues of a SPD matrix (by computing eigenvalues of tridiagonal matrix associated with the Lanczos algorithm). After a few iterations the largest eigenvalue is generally well approximated whereas the smallest is generally overestimated. Is there a way to have some estimate o...
I want to integrate a polynomial expression over a 4-node element in 3D. Several books on FEA cover the case where integrating is performed over an arbitrary flat 4-noned element. The usual procedure in this case is to find Jacobi matrix and use it's determinant to change the integration basis to the normalized one in ...
Suppose $A$ is a directed graph adjacency matrix. Is there any good interpration of the $(i,j)-$entry of the matrix $(A^{32}\cdot (A^T)^{32})$ ?
My problem is something similar to this. I'm trying to implement a (Neural Network) Cost function, Back propogation algorithm in Python. The Neural Network has 3 layers. Hence 2 parameters to optimize (Theta1 and Theta2; depicted as T1 and T2 in the program). I tried the solution offered in above link, but doesn't work...
This is often required in the stiffness matrix evaluation. Thanks to this thread I found out how to perform integrals over 2D surface. I've tried to evaluate the integral of the single shape function and got 0.3333. Now I want to have the expression which is being integrated to be more complicated. Namely I want to per...
I'm interested in maximizing a function $f(\mathbf \theta)$, where $\theta \in \mathbb R^p$. The problem is that I don't know the analytic form of the function, or of its derivatives. The only thing that I can do is to evaluate the function point-wise, by plugging in a value $\theta_*$ and get a NOISY estimate $\hat{f}...
In my field of research the specification of experimental errors is commonly accepted and publications which fail to provide them are highly criticized. At the same time I often find that results of numerical computations are provided without any account of numerical errors, even though (or maybe because) often questio...
Suppose a matrix $D\in\mathbb{R}^{n\times n}$ of Euclidean distances between $n$ points is given. To obtain a Gram matrix (matrix of inner-products of points that give rise to distances in $D$), one performs $$G=-1/2\cdot PD^{(2)}P^T,$$ where $D^{(2)}$ contains squared entries of $D$, and $P=(I_n-1_nw^T)$, $w^T1_n=1$. ...
Is there a published list of best practices to ensure longevity of code, with an eye towards reproducible scientific results? (e.g. open source, documentation practices, selecting dependencies, selecting a language, virtual machines, etc). Know of any studies (or lacking that, examples/anecdotes) that have tried to es...
To compute the eigenvector corresponding to a dominant eigenvalue of a matrix $A\in\mathbb{R}^{n\times n}$, one could apply the Power Iteration: $$v_1=\frac{Av_1}{\|Av_1\|}.$$ 1) in case $A$ is symmetric, eigenvectors are orthonormal. However, suppose that there are, e.g, two occurrences of the dominant eigenvalue $\la...
I have a 6-sided equilateral polyhedral cone in $R^3$ defined by a symmetric set of equations: $C=\{(X_1,X_2,X_3)\ |\ K X_i\leq X_j \forall i,j\in\{1,2,3\}\}$ Given an point $P=(P_1,P_2,P_3)$, I would like to know what is the closest point on the cone to $P$. I will need to implement this as an algorithm, so the mo...
I'm writing a reproducible paper, and the paper has computational results that are generated by a Python script (a similar MATLAB script generates nearly identical results). I feel that the paper would be easier to understand for readers if they could match up the calculations in the paper with calculations in the code...
As far as I can tell, finite volume methods are primarily for eulerian reference frames (such as in fluid dynamics simulations) while finite element methods are easily ameanable to lagrangian reference frames (such as in solid mechanics simulations). I've always taken it for granted, but I never really thought about w...
I know that long back Dr. Leszek Demkowicz finite elements codes(1Dhp,2Dhp,3Dhp) were available in his website. I'm finding it difficult to locate it now. Is there any alternatives available to these codes in FORTRAN(77/90) only.
Suppose we have a linear system and we know nothing about its conditioning and have no preliminary information about the solution. We blindly apply Gaussian elimination and obtain some solution $x$. Is it possible to determine whether this solution is trustworthy (i.e. that the system is well-conditioned) without thoro...
I'm trying to find the best approximation to the function $e^x$ in the finite dimensional polynomial space $P_4$ with respect to the standard basis vectors $B=\{1,x,x^2,x^3,x^4\}$ with inner product $$(f,g)=\int_0^1 \frac{f(x)g(x)}{\left(x(1-x)\right)^{\frac{1}{2}}}dx$$ Let $w=\sum_{j=0}^4a_j\phi_j $ where $\phi_j=x^j$...
Any error analysis is based on the Taylor expansions. So, if I take a finite difference scheme, I can calculate the value of the function at any point using the known value at another node via Taylor. However, if I am "at the edge" of the domain, the value of the function is fixed by the boundary condition, so how to d...
I want to understand how does the simulation identifies and models when two bodies are colliding with each other. For example car crash simulation. The car moves towards the wall or another crash. Until they collide some equations of moving works, but how do they change and what are the methods of dealing with the situ...
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: O(max{n,m}) where n is the size of the file and m is the length of the list But maybe I'm mixing apples and oranges here. What is the correct way to write or express this?
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 collect image intensity data for a number of points with $$ I_{pk} = f(E_{p}\Delta t_{k}) $$ Where $I_{pk}$ is the image int...
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 in turbulence community, you can see this course: http://www.math.ualberta.ca/~bowman/m655/lab3d.pdf Using the so called $2/...
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,x_i\in \mathbb{R}^d$. This needs to be solved recursively for a large number of values of $x_i$ for fixed $x_0$ (so if ther...
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 the improvement in speed by many factors!? 1) Minimizing a convex function L(X) in one matrix variable with orthogonality...
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?
Consider general system $Ax=b$. Does convergence of the Krylov subspace methods depend on actual vector $b$ assuming the initial guess is zero? I mean such factors as the locality of the source (with the limit case where RHS represents delta source) or the dynamic range of the values in there. Does finite precision pla...
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 could guess what sort of problem might cause this behavior? The problem is of the form: \begin{align} \text{min }& 0.5 x^T Q...
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 examples on the internet, where the problem with boundary conditions were precisely defined. Those were, unfortunately only il...
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 1000. I will be performing the index calculus algorithm so I will be generating (sparse) row vectors of the matrix serial...
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). Since I'm using CG for solving the linear system this is not acceptable since sometimes CG doesn't converge on semi-positiv...
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 exploit some matrix decomposition to compute the condition number in a faster way.
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 applications to add probabilities or probability densities that are represented in log space. Of course, either $\exp(x)$ ...
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 when I'm trying to use the scipy.optimize.fmin_cg function, the iterations take a very long time to execute. It exits with a...
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 problems already starting with a proper numerical definition of the Dirac deltas and a proper setting of the initial conditions...
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 cases, the physical simulation represents a "steady state" situation meaning that, in theory, the time series should be a ...
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. I've been playing with the FEAST eigenvalue solver [1] for problems of the type $A x = \lambda B x$, the dimension of t...
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 solution.
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. I want to compute $F^t(S_0)$, where $F^t$ is the flow of $v$. The velocity field is chaotic, so a direct computation l...
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 very little. I have concluded that solving this as a function of time is not possible in closed-form because a rope is a ...
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 of the linearized Navier-Stokes equations for incompressible flow" (Silvester et al.), which propose a Schur complement...
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 Euclidean space, rank of $G$ is, $rank(G)=rank(X)=d$. Now, suppose that the configuration $X$ is shifted to matrix $X'$ (shift...
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 plane, that have properties such as position, velocity, mass, radius and the resultant force. I want to update the univers...
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 constraint $\mathbf{x}^T\mathbf{x}=1$. Because $\mathbf{A}$ is a adjacency matrix of an undirected graph then I know that it is s...
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 minimum number of dimensions needed to represent a configuration (eg, a line is 1D, but can be represented in 2D). Different...
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 global maximum? Maybe few simple constraints imposed on generation process is enough to guarantee, that E-M will find globa...
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?
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 representing the solution. I can't figure out a way that smartly involves the toolbox functions (i.e. not involving low level inter...
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 intersection of two convex sets in the family. Has this been proven before?
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 the ray casting algorithm which is absolutely fine, but the country is hardly to be the simply-connected domain. For examp...
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 draw the solution step by step, it does give good animation. The problem is that the solution quickly converges to uniform, s...
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 form of a voxel grid with uniform sampling distances along each dimension. The flow field is a result of a numerical simul...
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 first way (between "1" and "2") the memory used is 8.2GB, while in the second way (between "2" and "3") the memory usag...
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 are rarely used by popular benchmarking sites on lastest/greatest CPUs. When it comes to codes that use sparse/dense nume...
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 code in the case where $k=1$ and the exact solution is: $$u(x) = x(1-x)$$ Hence, $$f(x)=-ku''=2$$ Using this informati...
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 through a state space"). Although I'd like to critically evaluate this trend, I'm embarresed to admit that I've never taken...
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 purposes). I would like release such a library under GPL on some free hosting site such as Sourceforge or Github. Honest...
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 Balance Equations $\frac{\partial\sigma_x}{\partial x}+\frac{\tau_{xy}}{\partial y} + f_x=0$ $\frac{\partial\tau_{xy}}{\par...
I understand how to generate a random sequence of binary variables where 1 occurs with probability p and 0 occurs with probability 1-p. Namely, at each step you choose 1 if some random number is less than p and otherwise you choose 0. How does this generalize to more than two alternatives? If I have three mutually ex...
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 want to do Lagrange interpolation at any point $y_j$, I find three points from $x_i$ with values close by and fit the par...
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 the ratio of differences between solutions, that is $$\frac{u_h-u_{h/2}}{u_{h/2}-u_{h/4}}$$. I understand that it is val...
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 concept of fundamental solution confuses me. They appear in the integral equation during the deduction. I wonder what does fu...
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 transfer values (interpolate) between these grids. Assuming the body fitted grid is given in the form of coordinates of ...
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 really a need for this? I asked some days ago about Krylov subspace method in finite arithmetic, see Krylov subspace iterati...
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: pT is a probability distribution for the random walk (typically, each element is 1/N where N is the total number of elements) P is the connectivity matrix wh...
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. For some functions, there are numerically more stable variants. For example Fortran, R, Java and C both have Math.log1...
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} $$ which in my code I am using the (slick) ``einsum'' tool in numpy: tt = np.einsum('ai, aj, ak, al', w, w, w, w) with import...
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 constant and $f(S,T)$ is a function to be reasonably assumed Where do I even begin... I know I have to use a numerical solution bu...
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 $\mathbf{B} = \nabla \times \mathbf{A} $ or the scalar potential $\mathbf{H} = - \nabla \psi$ to fulfil one of the equations. W...
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 parallelize it. I was reading about from the following link: http://cnx.org/content/m32782/latest/, Should I to pay attention ...
Could someone explain me (roughly) the interest of Bounded Variation (BV) Spaces for PDEs ? Is there any numerical application of those space to real problems or is it just a theoretic way to formulate specific problems ? Thank you very much.