# All Questions

8,846 questions
Filter by
Sorted by
Tagged with
278 views

### Recommendation for a python book for data processing

I've been doing FORTRAN programming for 10 years and I've started using python for a few years now, mostly for data processing. I've been lucky enough to work with people that are knowledgeable ...
9k views

### Understanding the “rate of convergence” for iterative methods

According to Wikipedia the rate of convergence is expressed as a specific ratio of vector norms. I'm trying to understand the difference between "linear" and "quadratic" rates, at different points of ...
643 views

### Orthonormalized Bernstein polynomials using Gram-Schmidt

I was wondering, before trying to do that myself, has anyone attempted to do orthonormalization of Bernstein polynomials using Gram-Schmidt? I discussed this with several people and have been told ...
370 views

### Checking for error in conjugate gradient algorithm

What is a good way to check if the any numerical error is occured in conjugate gradient algorithm. Additionally why is it not suggested to check error by checking A-orthogonality of search direction ...
558 views

### Evaluating sine and cosine of an integer multiple of an angle

When evaluating cylindrical harmonics, one needs to evaluate trigonometric functions $\cos(m\theta)$ and $\sin(m\theta)$, potentially for large integer $m$ and $\theta\in[-\pi,\pi]$. What is the best ...
2k views

### Magma vs. Plasma

I'm having a difficult time understanding the difference between the linear algebra packages MAGMA and PLASMA from just a quick glance. It looks like MAGMA is oriented towards GPU's and vector ...
487 views

### How to apply a Galerkin finite element method to a linear, one-dimensional boundary value problem

I have the following boundary value problem: $$-(\alpha u')' + \gamma u = f$$ in $\Omega = (a,b)$ with b.c. $u(a) = u(b) = 0$ and $\alpha > 0, \gamma ≥ 0$ and $f:(a,b) \to \Re$ The weak ...
2k views

### Flexible Mesh Framework

I am looking for flexible and easy to learn mesh framework which provides data structure for representing and manipulating meshes in 2D i 3D. I've already found a few: MSTK https://software.lanl.gov/...
258 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 ...
116 views

### Simple substitutions using symbolic computing in MATLAB

Suppose I have the following MATLAB code. syms a b c1 c2 c1 = a + b + pi*b c2 = a + b + 0.5*b Then c1 gets evaluated to ...
604 views

I have a $4\times 4$ matrix and I want to use Jacobi iteration on it. Right now the spectral radius is higher than $1$. I know that the method is guaranteed to converge if the matrix is diagonally ...
398 views

### Computation of Cholesky factor

So the Cholesky decomposition theorem states that that any real symmetric positive-definite matrix $M$ has a Cholesky decomposition $M= LL^\top$ where $L$ is a lower triangular matrix. Given $M$, ...
286 views

### How to design good finite difference schemes? [closed]

In principle, I know finite differences. In university, we discussed it and derived consistency and boundary conditions. But I am still left with a big question. How to design a good finite ...
120 views

### how to approach time zero when the equation is not defined at that point

Some background: define a process $Y_t=\frac{1}{t}\int_0^tX_sds$, where $X_t$ is a standard Brownian motion. Then I define a function $u(t,X_t,Y_t)$ and require it to be a martingale. Thus, by ...
970 views

### What are some good data-types for unstructured cell-centered FVM CFD code?

I'm interested in an advice for efficient data structures for cell browsing in unstructured cell-based finite volume CFD. One example that I encountered (in dolfyn cfd code) goes like this (I'll show ...
853 views

### Numerical Integration - handling NaNs (C / Fortran)

I am dealing with a tricky integral that exhibits NaNs at certain values near zero and at the moment I am dealing with them quite crudely using an ISNAN statement which sets the integrand to zero when ...
537 views

### Poisson solver on unstructured mesh

For the 2D Poisson equation, there exist on finite difference mesh, some code taking $O(n \log(n))$ operations to solve it on a mesh with $n$ nodes. They rely on Fast Fourier Transform or Block Cyclic ...
6k views

### I am looking for a parallel dynamic graph library in C++

Hello scicomp community, I have worked in the area of graph algorithms using frameworks such as NetworkX (Python), JUNG and YFiles (Java). I am now entering the area of parallel and high perfomance ...
217 views

### $k$-Nearest Neighbor Search using examples

I want to perform $k$-Nearest Neighbor Search in multidimensional space, but not using for example $L_2$-distance. I want the user to specify some "similar"-pairs examples and then perform a search ...
343 views

### Orthogonal vs general curvilinear coordinates

Solutions to PDEs over irregular domains can be computed using the finite difference method by the introduction of so called body fitted coordinate systems where the coordinate lines are aligned to ...
349 views

### Computing an orthogonal matrix subject to linear constraints

I am looking for a method to solve the matrix equation $$DXa = Xb$$ where $D\in \mathbb{R}^{n\times n}$ is diagonal, $a, b\in \mathbb{R}^{n}$ and $X$ is the unknown orthogonal $n\times n$ matrix ...
207 views

### Imposing invertibility on a Matrix

I have a symmetric positive semidefinite covariance matrix $A$, which is approximately computed as the output of a quadratic regression. I then need to invert $A$, but often it is close to singular. I'...
670 views

308 views

### Approximating and visualizing basins of attraction

I am working on estimating the position and orientation (pose) of a model (rigid object) from its silhouette in an image. For this, I have constructed an error measure between the model in its pose ...
262 views

### Rebinning algorithm in VEGAS

I am trying to understand the rebinning algorithm of the VEGAS (original publication (preprint from LKlevin) and implementation notes) Monte Carlo integration. I will try to explain first what I think ...
115 views

### Are matlab C library versions backwards compatible?

I have some C++ code that links to matlab2008b. Are matlab 2012a and 2012b backwards compatible with 2008b? If it's not trivially compatible, are there some simple steps to make it compatible?
3k views

### Laplace's equation problem in Polar Coordinates (Edit)

Is there public code in Matlab for solving the Laplace equation in polar coordinates in a circular domain? I tried a lot but my level of Matlab and Mathematica is not good enough, but still not ...
1k views

### How to find all complex roots of an equation in a domain

I am facing a problem where I want to find the complex roots of $f(z)=z-sin(z)=0$ numerically. There are infinitely many roots of the function, but I am only interested in the $N$ closest to the ...
1k views

### Does Computational Science involve programming?

I read about computational science on Wikipedia, but my understanding is not very clear. Does computational science involve programming? How different is computational science from computational ...
92 views

### Existence of a solution at a stationary equation for quadratics

Given a convex quadratic function $f(x)$, to obtain a solution for which $f(x)$ has minimal value one sets $\nabla f(x)=0$, and solves for $x$. Suppose that the result of differentiation of convex ...
148 views

### What is the algorithm for computing block reflectors in xDLARFB

The theory behind computing a single Householder reflector to zero out part of a column of a matrix is pretty well described in Matrix Computations by Golub and Van Loan. However, the blocked ...
520 views

### Regression testing of chaotic numerical models

When we have a numerical model that represents a real physical system, and that exhibits chaos (e.g. fluid dynamics models, climate models), how can we know that the model is performing as it should? ...
685 views

### Implementing a numerical method for unconstrained optimization in Go

I would like to implement a Numerical Optimizer in my favorite language Go. It shall find solution(s) to this problem: maximize a function f(x) where ...
1k views

### Mixed boundary conditions Finite Element Method

I have the following problem in Finite Element Method $$-(\alpha u')' + \beta u' + \gamma u = f$$ with $\Omega = (0, 1)$, $u(0) = 0$ and $u'(1) = 3$ to be able to write the weak formulation ...
206 views

### Mesh partitioner that assures non empty subdomain?

Does some of you know a mesh partitioner that assures non empty subdomains? For METIS, ParMETIS and Zoltan this is not the case.
388 views

99 views

### Bounded Variation Spaces

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 ...
93 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 ...
2k views

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 $\... 1answer 70 views ### Thermoplastic Equation solving I was given a problem by my professor as follows Solve the System$pV=SpcT=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 ... 1answer 270 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}$$ ... 1answer 273 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....