All Questions

8,191 questions
Filter by
Sorted by
Tagged with
257 views

Quadrature-free DG method using nodal Lagrangian basis are computationally very efficient. I have seen many papers using this method for linear PDE but almost no literature for non-linear PDE like ...
2k views

Venues for publishing papers that emphasize software

Software is a fundamental part of computational science, and is increasingly recognized as an essential part of the scientific record. Given the value of using existing and well-tested code, it seems ...
38 views

Hybrid Ellpack-Itpack (ELL) + COO Sparse Matrix Representation decomposition threshold

Hybrid ELL-COO sparse matrix representation can be done as in the picture, I was looking intensively, however I couldn't find out what is the threshold of decomposing the original matrix into ELL part ...
16 views

Normalising DFTs Correctly

I have been playing around with convolutions in scipy's signal package: ...
13 views

Efficient Alternatives to Operator Splitting in NLSE

Lately i've been trying to decide my thesis theme and i've become interested in adaptive finite elements and finite volumes algorithms. However, I need my thesis to fit into a physics related theme. ...
13 views

How to handle system of chemical reactions for a batch reactor SciPy solver

I have a system of chemical reactions where the rate equations represent a batch reactor model. The model is a system of ODEs which is solved with the SciPy ...
69 views

What algorithm do BLAS and ATLAS use for matrix multiplication?

I have searched and what I understood was that they use the naive one with several memory and cache optimizations. However, I wanted to know whether they are using the Strassen or the Coppersmith-...
15 views

Implementing Housholder QR decomposition in Python

I am struggling to get my implementation of householder qr decompostion to generate the correct answers. I have been working on this for days and cannot workout where my code is going wrong. Any help ...
4k views

How to implement Gauss-Laguerre Quadrature in Python?

To get the hang of Gauss-Laguerre integration I have decided to calculate the following integral numerically, which can be compared to the known analytical solution: \begin{align} \int_0^{\infty} s^...
20 views

Interpreting results of using no-flux boundary condition

I am solving for solute transport in 1 D. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$ No-flux boundary condition is imposed at both the ...
14 views

Live audio processing using c++ (standard or external libs 'ue4')

My goal is to get audio from the input of another device (either connected to computer throught aux or audio interface threw rca or coaxil(from an external device playing audio live) adapters to line ...
37 views

Low rank update of QR of inverse

I am in a situation where as part of a sort of inverse power method scheme, I want to very often perform the following step: Apply a symmetric rank one update $uu^\top$ to my inverse matrix $A^{-1}$ ...
58 views

139 views

Does iterative method work for singular consistent linear system Ax=b?

Recently, I have been studied iterative methods for large sparse linear system Ax=b, where A is nonsingular, so there is a unique solution x. And the stopping criterion is usually chosen with norm(b-...
75 views

29 views

Why the iteration steps become twice if the step size reduces half for CG methods?

For CG method for SPD matrices, (Ax = b arising from Poisson equation with homogeneous boundary condition) we know that the convergence theorem: After m steps of iteration, the error $e^{(m)}=x-x_m$ ...
52 views

Optimal line such that maximum points are between an upper and lower boundary

I have some 2D data and would like to find a line $y = mx + b$ such that a maximum number of points from the data is captured within the area between $y = mx + b + margin$ and $y = mx + b - margin$. ...
15 views

Counting number of calls to union operation while creating disjoint set from an undirected graph

I am working through an algorithms book, and I am having trouble understanding the solution to a problem in the book. This is found in the Introductions to Algorithms book in Chapter 21 on disjoint ...
29 views

How to use matlab **fft** function or other fast methods to solve a convection-diffusion system quickly?

for a convection-diffusion equation with Dirichlet boundary conditions as follows: $$-u''+qu'=f$$ Using centered difference for $u''$ and $u'$, we get a linear system $$Ax=b$$where matrix $A$ is ...
70 views

Extracting FEM matrices in matlab pde toolbox

I am trying to follow the dynamic linear elasticity in Matlab, link here. My goal is to extract the FE Matrices using the function assembleFEMatrices in matlab and solve the resulting system of second-...
35 views

Dealing neighbor list in NVT Monte Carlo (MC) simulation

I'm making a NVT Monte Carlo (MC) simulation code with only short range interaction. I found many MC tutorial codes (usually Lennard-Jones system) in online. However, most of them are doing energy ...
83 views

Numerical derivative in python

I am trying to take the numerical derivative of a dataset. My first attempt was to use the gradient function from numpy but in that case the graph of the derivative ...
55 views

Solving diffusion equation using finite difference method

I am solving an 1-dimensional diffusion equation with Neumann boundary condition at outlet and constant concentration, C, at the inlet. In the end, I want to observe how the concentration diffuses ...
88 views

32 views

Are 2nd spatial derivatives useful for integrating ODEs?

In discussion of adaptive integrators for ODEs, I see a lot of discussion of how second derivatives in time can be approximated using finite differences, i.e., take several steps, and use numerical ...
24 views

How to ensure values stay within range?

e.g. water in a height map Choosing a range with a margin of error for typical model behaviour seems practical. Could we instead (1). predict maximum values; or (2). have a natural maximum? 1. ...
84 views

Analytic formula for leading eigenvector of $uu^T + vv^T$?

Let $u$ and $v$ be nonzero column vectors of size $n$ and consider the $n \times n$ positive-definite matrix $A:=uu^T + vv^T$. In this post https://math.stackexchange.com/a/112201/168758, the ...
Efficient computation of leading eigenvector of a matrix product of the form $ADA^T$, where $D$ is diagonal
Let $A=[A_1|\ldots|A_m] \in \mathbb R^{n \times m}$ with $n \gg m \gg 1$ and $D=\text{diag}(d_1,\ldots,d_m)$ where $d_1,\ldots,d_m > 0$, and consider the $n\times n$ positive-definite matrix \$X=\...