All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

How to extract connected components from persistence diagram?

From the given point cloud (Fig. 1), I use Scipy-TDA to extract persistence diagram (Fig. 2). What I'm interested in is to extract 3 circles. For example, I'd like to know 3 center points and labels ...
1
vote
2answers
43 views

Testing the time dependent Schrodinger Equation with an analytical solution?

I am numerically solving the Schrodinger Equation in 1D first and in higher dimension later, but I want to know the convergence rate of my numerical solver in different grid size and numerical methods....
-1
votes
0answers
7 views

Error at boundary due to fixed b.c in 3rd order pde

I have a 3rd order in space and first-order in time PDE to solve, as an initial value problem, using the finite element method under fixed boundary condition at endpoints. My endpoints in space are <...
1
vote
1answer
103 views

(FEM) Efficient CRS vectors evaluation using elements connectivities

What is an efficient way of evaluating the column (col_ind) and the row (row_ptr) vectors for the CRS (Compressed Row Storage) storage format using the Connectivity Array? The Connectivity Array is a ...
2
votes
1answer
62 views

How to solve for f(A)x=b without GMRES?

How to solve for $f(A)x=b$? For GMRES, an answer is given in this book chapter: http://link.springer.com/chapter/10.1007%2F978-3-642-58333-9_2. Ungated version: https://www.researchgate.net/profile/...
1
vote
2answers
108 views

GMRES : incomplete Krylov-subspace

At each iteration $i$ of the GMRES method, is calculated a single new orthonormal vector of the existing Krylov subspace. If the norm of that vector is 0 (or close to 0), then the subspace is "...
1
vote
2answers
196 views

Solve a very large linear system (question about a library linear algebra to do this)

I need to solve a very large linear system (coming from finite element method). I'm currently using the Intel MKL library, but the system has been delayed more than 20 hours. The matrix of the system ...
4
votes
1answer
280 views

Quadrature and quadrature-free discontinuous galerkin method for non-linear PDE

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 ...
3
votes
2answers
8k views

scipy odeint - Excess work done on this call

I'm newbie both in calculus and Python/Scipy so I apologize if this question is too dumb. I'm trying to model flow between two pressure vessels. Let's say we have two points and a link between them ...
0
votes
1answer
43 views

Global to local transformation matrix in 2D frame structures

In section 3.2 of this paper [1], where 2D planar frame structures are being analyzed, the authors mentioned a transformation matrix to be used in extracting the element displacement vector from the ...
2
votes
1answer
61 views

Bareiss algorithm vs. LU-decomposition

I at the moment try to fully understand the Bareiss algorithm for calculating determinants. One question that came to my mind is the following: Why is LU-decomposition much more often used than the ...
-1
votes
0answers
26 views

Code for computing the Partial Fréchet Distance [closed]

I am looking for a code (Python, Matlab, R) to compute the partial Frechet distance. That is a similarity measure for curves that takes into account partial matchings. References Buchin, K., Buchin,...
2
votes
3answers
729 views

How is the divergence and curl approximated in Smoothed Particle Hydrodynamics?

I was reading through Monaghan, SPH, 1992 paper and he states that any quantity $A$ at $r_b$ can be approximated by $A(r) = \sum_b m_b \frac{A_b}{\rho_b}W(r-r_b,h)$ and so the gradient of that ...
3
votes
1answer
110 views

Mesh with constraints

Is it possible to construct a constrained tetrahedral mesh of a domain using Tetgen or similar software? What I mean by constrained is that there are some nodes or edges that are not free but are ...
2
votes
1answer
158 views

Is there a simple way to avoid carbuncles for FD WENO methods?

I have implemented finite-difference WENO scheme for Euler equations (with some variants - WENO-JS, WENO-Z, WENO-M, different flux splitting). It works well, but have problem with so-called carbuncles ...
-1
votes
0answers
33 views

Moreau Yosida approximation [closed]

Definition: Let $(X,d$) be a metric space and let $f:X\to\mathbb{R}$ be a bounded function. (that is, there is some $M>0$ such that $|f(x)|\leq M$ for all $x\in X$). Then the lower and upper ...
3
votes
1answer
46 views

Compute distances from a vector to a matrix of vectors

Let $\vec{a} \in \mathbb{R}^\alpha$, and let $H$ be a rank 3 tensor with dimensions $M_{[i \in \mathbb{N}]} \times N_{[j \in \mathbb{N}]} \times \alpha_{[k \in \mathbb{N}]}$ (where the subscript are ...
2
votes
0answers
31 views

Evaluating integral $F(r_2) = \frac{1}{r_2^n} \int_0^{r_2} r_1^n f(r_1)\ \mathrm{d}r_1$ without growing instability

I have the following expression to be numerically integrated in a vector-based library (e.g. numpy, MATLAB, etc), $$ F(r_2) = \frac{1}{r_2^n} \int_0^{r_2} r_1^n f(r_1)\ \mathrm{d}r_1, $$ where $n$ is ...
7
votes
4answers
4k views

Algorithm for high quality 1/f noise?

How can I generate arbitrarily high quality $1/f$ noise, for use in a model? My model involves a lot of feedback, over a large number of iterations, with a very high bandwidth, so I'd like the $1/f$ ...
-1
votes
1answer
32 views

Matrix requirements for cusparse*csrgemm2

I would like to perform a matrix multiplication like: $C=A*B*A'$ using cusparse library function cusparseDcsrgemm2. To do this I split it into two matrix-matrix multiplications where all matrices ...
1
vote
0answers
24 views

How to properly compute weights for Weighted Least Squares (WLS)?

I want to apply the weighted least squares method in order to identify parameters of a dynamic process. The process is described by a second order differential equation of the form: $$ \ddot{y}+a_1\...
1
vote
1answer
281 views

Split-step Fourier method applied on Schrodinger equation

I'm trying to solve a Schrodinger equation of the form $i\frac{\partial}{\partial t}\psi=-\frac{\partial^2}{\partial x^2}\psi + (V(x)+\alpha|\psi|^2)\psi$ using the split-step Fourier method ...
2
votes
1answer
68 views

Fourier spectral method for coordinate transformed heat equation

As the title said, I want to solve a coordinate transformed heat equation using fourier spectral method. In particular, I am interested in transforming an uniform grid into an adaptive non-uniform ...
0
votes
1answer
22 views

Defining system of ODEs: only size-1 arrays can be converted to Python scalars [closed]

I am trying to define the following system of ODES in python: $$ \left(\frac{dP}{dt}\right)=\sqrt{ \left(1-\frac{3}{P}\right)\left(2+\frac{4}{P^2}\right)\\ } $$ $$ \frac{d\varphi}{dt}=\frac{1}{P^2} $$...
0
votes
1answer
187 views

Chip testing problem

An engineer has n supposedly identical integrated-circuit chips that in principle are capable of testing each other. The engineer test jig accommodates two chips at a time. When the jig is loaded, ...
1
vote
0answers
42 views

Residual of Poisson equation with periodic boundaries

I am trying to write a multigrid solver for Poisson's equation, $-\Delta u=f$, on the unit square, $\Omega=(0,1)^2$ with periodic boundaries. My primary source has been Multigrid by Trottenberg, ...
1
vote
0answers
38 views

Numerical errors due to terms of the form $\frac{1}{r}$ (r goes to 0 at the boundary) while using finite difference method

I am trying to solve a system of differential equations using finite difference method. There are few terms of the form $\frac{A(r)}{r}$, both $A(r)$ and r go to zero at the boundary. Analytically ...
8
votes
6answers
3k views

Seeking a free symbolic regression software

Now that Formulize / Eureqa started charging $2500 a year for using it and having crippled the trial version, does anyone know of any replacements that can do similar things like find an equation ...
4
votes
1answer
135 views

The velocity Verlet method and variable time steps

Does the velocity Verlet handle variable time steps? I found controversial statements about it. In the paper Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT ...
3
votes
1answer
55 views

Arbitrary Precision Optimization Libraries?

Are there any well-known optimization libraries (ideally with Python bindings or even in Python) supporting (unconstrained) minimization (of $f:\mathbb{R}^n \to \mathbb{R}$ for $n$ for $n\sim 10^1,10^...
1
vote
2answers
52 views

Writing code on the CPU while developing, running it on the GPU when live - which approach?

In my simulations I am using dense matrix-vector multiplications and 2D-fft transformations quite often, for matrix sizes of 8kx8k and up. Hence, I assume that using a GPU is beneficial for speeding ...
1
vote
0answers
56 views

Are linear, CTCS codes always stable?

I would like to solve some equations which basically look like this $$\frac{\partial u}{\partial x}=F\left(v,\frac{\partial v}{\partial y},\frac{\partial^2 v}{\partial y^2}\right),$$ $$\frac{\partial ...
4
votes
1answer
141 views

Fast algorithm for computing cofactor matrix

I wonder if there is a fast algorithm, say ($\mathcal O(n^3)$) for computing the cofactor matrix (or conjugate matrix) of an $N\times N$ square matrix. And yes, one could first compute its determinant ...
9
votes
4answers
419 views

fastest linear system solve for small square matrices (10x10)

I am very interested in optimizing the hell out of linear system solving for small matrices (10x10), sometimes called tiny matrices. Is there a ready solution for this? The matrix can be assumed ...
0
votes
1answer
46 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 ...
3
votes
1answer
70 views

Singular vectors of s1 for tiny dense matrices

I have a function whose main bottleneck is finding a(ny) singular vector pair in the space of the largest singular value, along with the singular value itself. This is done a huge number of times. ...
-1
votes
0answers
46 views

Showing N = NP on-line [closed]

I have a theorem that proposes a method to build algorithms. All the algorithms produced by this method are in P ... they never go up to more than $6(n^{12})$ operations. Following that, I have ...
3
votes
1answer
67 views

Big Theta Complexity of Gaussian Elimination using Complete Pivoting

I already know the Big O for partial pivoting is $O(n^3)$ and remain the same for complete pivoting. I also know the big theta complexity for partial pivoting is $2/3 n^3$ I would like to know the ...
1
vote
2answers
79 views

Calculate cofactor-matrix efficiently [duplicate]

I've implemented an algorithm that can calculate the cofactor-matrix of a matrix in $\mathcal{O}(n^5)$. The algorithm just step-by-step iterates over the whole matrix ($\mathcal{O}(n^2)$) and for ...
0
votes
0answers
55 views

Arnoldi Decomposition Algorithm

I try to get into GMRES via Arnoldi-Decomposition. For my understanding, I Implemented the Arnoldi-Decomposition in python. ...
19
votes
5answers
3k views

Parallel Scientific Computation Software Development Language?

I want to develop a parallel scientific computation software from scratch. I want some thoughts on which language to start. The program involves reading/writing data to txt files and doing heavy ...
2
votes
4answers
612 views

Finite volume piecewise linear 2D advection develops instability

I'm developing a finite volume solver for the simple twodimensional advection equation with constant velocities $u, v$ and constant mesh spaces $\Delta x$: $$ \frac{\partial \rho}{\partial t} + u \...
0
votes
1answer
48 views

Solve convection-diffusion equation with a non-linear source term

I would like to solve this equation (which is adapted in my case, a plug flow reactor when a reaction occurs): $ \frac{df}{dt} = D \frac{d²f}{dz²} - u \frac{df}{dz} + r(z,t) $ with $r(z,t)= - k f^{n}...
1
vote
1answer
65 views

Numerical integration methods: Explicit vs Semi-Implicit vs Newton-Euler 1, 2 and use in cyclone physics engine

I am trying to understand the difference between explicit Euler and semi-implicit Euler integration, where in explicit Euler the current position is calculated as $$x_{n+1} = x_n + v_n$$ and semi-...
2
votes
1answer
105 views

Order of Accuracy Measurements on 1D Advection Methods

I am trying to learn about basics of computational fluid dynamics, at the moment on the simple example of linear advection in 1D. I am am currently testing the theoretical predictions of the order of ...
2
votes
2answers
349 views

Which SciPy nonlinear solver when Jacobian is analytically known and sparse?

I have a nonlinear function fun with n inputs and n outputs. I also have a function jac which calculates the Jacobian, which is ...
3
votes
1answer
2k views

Does the global stiffness matrix size depend on the number of joints or the number of elements?

When assembling all the stiffness matrices for each element together, is the final matrix size equal to the number of joints or elements?
0
votes
0answers
52 views

Zero error at nodes using FEM? [closed]

Reading the discussion at this link I got confused. I am solving, using Finite Element method, a simple Poisson problem, $$ -u''= f(x)\, ,$$ on a simple unit square domain where I have chosen ...
20
votes
5answers
7k views

Why are higher-order Runge–Kutta methods not used more often?

I was just curious as to why high-order (i.e. greater than 4) Runge–Kutta methods are almost never discussed/employed (at least to my knowledge). I understand it requires greater computational time ...
5
votes
1answer
104 views

Why lattice Boltzmann despite its huge number of mesh points still has worse accuracy in comparison to FEM for calculating wall shear stress?

I'm just doing a very simple experiment. I'm calculating wall shear stress based on Poiseuille flow for a pipe by using lattice Boltzmann method (LBM) and FEM to compare their values with the ...

15 30 50 per page
1 2 3 4 5 170