All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
31 views

implementation for coppersmith matrix multiplication

Is there any online implementation for the coppersmith matrix multiplication I have searched alot but can not find any? and if there is not any why is that Isn't this algotithm much faster than ...
-1
votes
0answers
32 views

Long time for allocating Compressed Sparse Row (CSR) vectors

I developed a Fortran subroutine that allocates memory for the values vector "A" regarding CSR data structure. It also allocates and creates the "JA" and "IA" vectors. However, its taking too long. ...
2
votes
1answer
45 views

What is good practice for protecting parent scope variables in FORTRAN?

So I just picked up a project that is written in fortran90. I am used to coding in python and C. What is really troubling for me is the use of subroutines in fortran90. In fortran people use ...
2
votes
1answer
52 views

Numerical solution to parametrized second order ODE with nonuniform coefficients

I am trying to solve numerically the following second order linear ODE: $a \frac{\partial^2 u}{\partial x^2} + \frac{\partial u}{\partial x} \frac{\partial a}{\partial x} + b u =0$, on the domain $[...
3
votes
1answer
35 views

Differences between Discrete Fourier Transform and Continuous Fourier Transform?

I am trying to visualize the time dependence of a free particle given an initial wave-function using Python and I just wanted to know if I could use the in built FFT implementation from NumPy to find ...
3
votes
1answer
37 views

Scipy Spline Interpolation Parameter

Documentation in scipy.interpolate (found at https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html) states: "The parameter variable is given with the keyword argument, u, which ...
0
votes
0answers
40 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 optimization but I wanted to know are they using strassen or copper smith algorithms and if they ...
0
votes
0answers
52 views

Eigenvalues of jacobian are negative for poisson equation, but positive for a (linear) heat equation?

To check the stability of my non-linear equations during solving (using Newton's method), I try to calculate the eigenvalues of the generated jacobian matrix. For that I use Arpack. Now, for testing ...
5
votes
1answer
32 views

Maximum and Minimum distance from query point within bounding box

I'm reading an article regarding approximating sums using KD-trees (similar to FMM). As part of the effort I'm trying to make sense of this article , which is cited. I'm having trouble understanding ...
6
votes
1answer
112 views

What guidelines should I follow for simulation software projects?

I am not sure whether this question belongs here, but I would like to give it a try and benefit from the experience of the people at scicomp.SE. From my experience, the software quality in ...
3
votes
1answer
68 views

Parallelizing Newton-method in solving non-linear systems

Circuit simulation software based on SPICE (such as ngspice) uses Newton-Raphson method to solve non-linear system of equations ...
1
vote
1answer
60 views

Fenics: solving the same PDE multiple times

I am new to Fenics and just started reading the tutorial Solving PDEs in Python. For simplicity, we can refer to simplest example, page 17 (the linear poisson equation), despite not necessary. My ...
3
votes
3answers
87 views

Find shortest path around a cylinder represented by 3d triangular mesh

Suppose I have a 3d triangular mesh with the topology of a finite cylinder. Let $C$ be a vertex on that mesh. How can I find the shortest path from $C$ to itself that goes around the cylinder? By ...
3
votes
3answers
105 views

GPGPU computing, software selection

I am using an existing GCC C++ x86 Qt application that filters, displays and stores results computed by some C code. Since the computation by now got too complex for CPUs I intend to port the small C ...
0
votes
0answers
21 views

Controllability - Maximum Matching

I found this image on wikipedia referring to Barabasi's work on Network Controllability. I tried to verify it. We have a A matrix of dimensions (20 by 20) made as the image suggests. According to the '...
8
votes
1answer
94 views

Is using std::valarray considered good practice?

C++ has had the std::valarray class since the C++98 standard. It is meant to facilitate numerical computations, providing the sort of operations one would expect of ...
1
vote
1answer
75 views

Lapack symmetric update $B^{-1}AB^{-T}$

Does Lapack have a routine that, given symmetric $A=A^T$ and $B$, computes the symmetric matrix $B^{-1}AB^{-T}$ (while preserving symmetry exactly)? It would be enough to have this routine for ...
2
votes
0answers
17 views

Partial/Extended/Truncated Template Matching

So template matching using correlation is available in a lot of computational packages; OpenCV matchTemplate(), scipy.signal.correlate2d(), IPP CrossCorrNorm, etc. But they all either evaluate ...
2
votes
0answers
28 views

Palmprint Identification - Why do we align the images before we use the Fourier Transform?

I am currently reading the paper PALMPRINT IDENTIFICATION BY FOURIER TRANSFORM by WENXIN LI, DAVID ZHANG and ZHUOQUN XU about identifying persons based on an image of their palm, one version of the ...
1
vote
1answer
43 views

ODE Event detection for calculating multiple roots of continuous sinusoidal equation

Hey everyone I have a paper that has a method for computing rise and set times of a satellite given a closed form solution. It is a complicated sinusoidal function and the paper has a method to ...
1
vote
1answer
67 views

Lattice Boltzmann methods vs Navier stokes/ other eulerian methods for *water* simulation

Note, there is already a question here, however the answers don't answer the original question, let alone specific considerations when dealing with nearly in-compressible fluids (water). Another ...
1
vote
1answer
59 views

How to Break Coupled ODEs down to first order for Runge-Kutta

My question might seem a bit simple. I am trying to solve a system of ODEs using Runge-Kutta method. I am having difficulty breaking down the equations into a system of first order ones required ...
3
votes
1answer
53 views

Computing autocorrelations of configurations in Monte Carlo simulations

In the context of Monte Carlo simulations, I am trying to learn how I should ensure that the configurations of my system are not correlated for the chosen interval of measurements. I have found out ...
1
vote
1answer
55 views

Eigenfaces Algorithm

This might be a silly quesntion but recently I've been trying to program the eigenface algorithm using PCA, so I arranged the face vectors vertically in a matrix X such as: X = [x1,x2,x3,...,xn]; In ...
3
votes
1answer
38 views

Conjugate Gradient for singular 2D poisson finite element with Neumann Boundary Conditions

Heavily edited question after I realised partly what the problem was I have programmed a simple 2D square finite element solution to the Poisson equation $-\Delta u = f$ The source function ...
1
vote
0answers
55 views

Ramp least squares estimation

With some given $s$ value, let \begin{equation} \begin{aligned} h(\beta)&=\min(\sum_{i=1}^n(Y_i - X_i\beta)^2, s)\\ &=\sum_{i=1}^n(Y_i - X_i\beta)^2-\max(0, \sum_{i=1}^n(Y_i - X_i\beta)...
2
votes
1answer
33 views

Stability of a finite-difference scheme for the reaction-diffusion equation

I currently need to solve numerically the following reaction-diffusion equation: $$\partial_tu=\partial^2_xu+u-u^2$$ For this purpose, I use the following numerical scheme (Crank-Nicolson??): $$ \...
1
vote
1answer
40 views

Is there any method to incorporate minor changes into solved meshes to speed convergence in particle-in-cell solvers?

Apologies for the terrible title. I'm trying to perform a 10^6 timestep electrostatic particle-in-cell simulation on a rather large mesh, with very limited computational resources (a single GPU). ...
4
votes
3answers
267 views

Inverse of Large Symmetric Matrix

I've got a matrix K, with dimensions $(n, n)$ where each element is computed using the following equation: $$K_{i, j} = \exp(-\alpha t_i^2 -\gamma(t_i - t_j)^2 - \...
1
vote
1answer
34 views

Obtain velocity from imposed energy spectrum using the inverse FFT

I am trying to obtain the spatial representation of $u(x)$ (e.g. velocity) from its energy spectrum $E(k)=k^4\exp(-(k/k_0)^2)$, which is given in the frequency domain, provided $|u(k)|=\sqrt{2E(k)}$. ...
1
vote
1answer
62 views

Numerical methods for non-linear diffusion

I have the following non-linear diffusion equation, for $\ z(x,t)$: $\ z_t = -C(\sin(\omega t))^m x^{hm}(hm x^{-1}(z_x)^n + n z_{xx} (z_x)^{n-1}) $ Any advice for numerical (or analytical) solutions?...
1
vote
1answer
53 views

Vectorization of Jacobi iteration

Assume I have a linear system of $A x = b$ which I want to solve with Jacobi iteration. Matrix $A$ is given in CSR format. The vectors are dense. The code for Jacobi iteration is quite clear and can ...
1
vote
1answer
76 views

For a determined (known) Space charge density, what are the conditions to obtain the Electric potential/field distribution? (COMSOL, MATLAB)

Theoretic part From the theory, in Electrostatics inside a real dielectric material between real conductors, in a simple 1D plane geometry between points $P1$ and $P2$, according to the current ...
1
vote
0answers
39 views

Finite element lemma proof

I was curious if anyone could help or provide a reference for the proof to the following lemma Lemma: Let $P_{1}$ be the set of polynomials of the first degree and let $W = w(x) : w \in C([0,1]), ...
4
votes
1answer
36 views

Value of $\gamma$ in the H-infinity norm

Suppose I have the system: $$\dot{x} = Ax+Bu\\ y=Cx+Du$$ and the following Hamiltonian matrix: $$H=\begin{pmatrix} A & \frac{1}{2}B^TB\\ -CC^T&-A \end{pmatrix}$$ I want to find the ...
1
vote
0answers
23 views

Book Recommendation: Analysis and design of mechanistic models - such as pharmacokinetics or hydrology models

I have been looking at an interesting book "Pharmacokinetic-Pharmacodynamic Modeling and Simulation" by Peter Bonate on pharmacokinetic models: the models of how medical drugs work their way through ...
2
votes
1answer
53 views

How to robustly and numerically expand a $k$-order polynomial in two variables defined on a polygon domain?

Given a $k$-order polynomial in two variable $p(x, y)$ defined on a polygon domain $K$. And I want to numerically expand it to the following form $$ p(x, y) = c_0 + c_1 x + c_2 y + c_3 x^2 + c_4 xy + ...
5
votes
0answers
161 views

Solving $AXB + X\odot C = D$ matrix equation

Can anyone see a way to solve this equation efficiently? $$AXB + X\odot C = D$$ I tried a straightforward solution that involved vectorizing $X$ but that turned out too expensive for my application -...
1
vote
1answer
46 views

Manual for library Libxc

Where can I find the manual for software library Libxc for exchange-correlation functionals? Links with domain www.tddft.org don't work.
1
vote
0answers
31 views

BicgStab is not able to solve while Jacobi or GaussSeidel Methods can

I am trying to solve the 2D laplace equation, $\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 0; \qquad 0 \lt x \lt 1, \quad0 \lt y \lt 1$ Subjected to the boundary ...
1
vote
1answer
49 views

Should the derivative of an array be calculated array by array or element by element in CFD codes?

I am making my own finite difference computational magnetohydrodynamic code in Fortran 90. Looking at other codes they appear to calculate for example their $x$-derivatives, bb of their variables, e.g....
2
votes
1answer
15 views

How To Interpret PCA Points Labeled With Specific Data Dimensions

I've done some PCA on my own, and am familiar with the basic concepts of how PCA components are calculated and applied. However, I'm working on a research project and am confused as to how to ...
1
vote
1answer
69 views

Using LAPACK to compute $B^{-1}AB^{-T}$ for thin $B$

How can I use BLAS/LAPACK to compute $$ B^{-1}AB^{-T} $$ where $A\in\mathbb{R}^{n,n}$, $B\in\mathbb{R}^{m,n}$ is full rank matrix with $m>n$, and $B^{-1}y:=\arg \min_{x} \|Bx-y\|_{2}$. In theory, ...
1
vote
1answer
46 views

Monotonicity preserving interpolant in 1D

I have a dataset $\{x_i, y_i\}_{i=0}^{n-1}$ where $x_0 < x_1 < \cdots x_{n-1}$ (not uniformly spaced), and, in addition $y_0 < y_1 < \cdots y_{n-1}$. So it feels natural to assume that $...
0
votes
0answers
29 views

host vs nodes vs sockets vs thread vs processors vs cores in cluster computing [duplicate]

I am new to the computer cluster and I am so confused with these terms, could you please explain them? Regards, Vricc
2
votes
0answers
19 views

Riemann solvers for metastable phases

Most Riemann solvers I've come across can solve the Riemann problem only under certain conditions such as convexity of the equation of state. But what happens if the fluid enters a metastable state or ...
0
votes
0answers
17 views

How to start coding for posterior inference

I am trying to implement the model given in http://proceedings.mlr.press/v84/andersen18a/andersen18a.pdf where they have used mean-field variational inference for posterior inference, but I want to ...
1
vote
0answers
46 views

Numerical Method for Equation System of two depending Equation Systems

I am searching a solution method for the following equation system of equation systems: Let $A \in \mathbb{R}^{n \times n}$ be an invertible Matrix, $f, b_1, b_2 \in\mathbb{R}^n$ given vectors and $ ...
2
votes
1answer
49 views

Python-accessible industry-standard for unconstrained minimization that converges to machine precision?

I have an unconstrained minimization problem of many variables for which I know the gradient exactly. I turned to the conjugate gradient method contained in ...
3
votes
1answer
47 views

Reconstructing statistics of $x\otimes y$ from E[XX'], E[YY'] and E[XY']

I'm looking at random vectors $z$ of size $d^2$ which can be written as $z=x\otimes y$ where $x$,$y$ are random vectors in $\mathbb{R}^d$ with following second moments known -- $E[XX']$, $E[YY']$ and $...

15 30 50 per page