All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Get interpolated values in user defined 2D grid Paraview

I have a 2D flow and would like to obtain the value of certain scalar field in a set of points forming a regular mesh. These points should not coincide with the nodes of the actual mesh used in the ...
0
votes
1answer
9 views

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=\...
0
votes
0answers
26 views

2D Heat equation - MatLab implementation (FD in space, Expl. Euler in time)

I'm trying to solve the heat equation in 2D in $\Omega=[0,1] \times [0,1]$, with homogeneous Dirichlet boundary conditions, and initial condition $u(x,y,0)=\sin(2 \pi x y)$ i.e. \begin{cases} u_t=u_{...
0
votes
0answers
14 views

Using surrogate optimization to reproduce analytical results

I am trying to reproduce results from the following paper: https://www.researchgate.net/publication/261186477_Optimal_design_of_a_novel_tuned_mass-damper-...
1
vote
0answers
17 views

Setting up diffusion with integral B.C. in Fenics

I'm trying to model diffusion through a cylindrical domain $D = \{ (x,y,z) : x^2 + y^2 \leq 1, \;\; 0 \leq z \leq 1\}$. The is an initial concentration of the diffusant at the upper flat surface, ...
1
vote
3answers
33 views

What is the flaw in my stability analysis?

The ODE $${d^2x\over dt^2}=-kx; k>0$$can be converted in the system of linear equations as $$\begin{align} {dx\over dt} & =v\\ {dv\over dt} &= -kx\\ \end{align}$$ Using Euler’s method, ...
1
vote
0answers
10 views

Forming Basis Functions from 6-31G Basis Set for Carbon Atom

I am a computer science grad and I am working to write an electronic structure calculation program and I am stuck at forming basis functions using 6-31G Basis set for atoms having higher atomic ...
3
votes
1answer
51 views

Deep learning using Distributed linear algebra

Is there any deep learning library based on Trillinos or Petsc linear algebra?
2
votes
1answer
32 views

Whether should we consider the condition number of the preconditioned matrix when choosing a preconditioner?

when we solve a large sparse linear system Ax=b, using preconditioned Krylov subspace methods,e.g., gmres, should we need to reduce the condition number of the coefficient matrix? In my opinion, we ...
0
votes
0answers
27 views

Getting started with Computational Chemistry

I´m now a chemistry grad student and I feel the need to get involved with computational chemistry and coding in the chemical field (in general). I have a very simple question: What is the best way to ...
0
votes
0answers
19 views

solving electron motion in undulator by Boris method

I am trying to use Boris scheme to solve the electron trajectory in undulator. The undulator field I used is: $$B_x = b_0\sin(2\pi \tfrac{z}{\lambda_u})$$ where $b_0 = \dfrac{2\pi c_{0}K}{q m_{e} \...
0
votes
0answers
23 views

Method for implementing QP solver with matrix terms?

I am trying to implement (in code) a QP solver for the following equation: $$\min_{u} u^{T} Wu$$ $$s.t. \; \beta u = \tau_{ref}$$ $$ Au \leq b $$ See this document, section 5.1 (Page 35) $u$ is a ...
2
votes
0answers
42 views

Smoothing FFT result

I am trying to calculate the spectrum of Bremmstrahlung, which involves calculating the Fourier transformed acceleration. I am solving a non-linear ODE to numerically calculate the acceleration in the ...
-2
votes
0answers
14 views

How to use the norminv function in excel

I am given a list of ages from 29-73 and I am asked to calculate what values fall within the middle $95%$,top $10%$, and $P20$ Any help would be greatly appreciated
4
votes
1answer
75 views

Do most statistical packages and libraries in high-level programming languages rely on LAPACK for their matrix inversion operations?

Possible an open-ended question, but I am wondering if most statistical packages and libraries, for instance, Stata, R, Python's NumPy and MATLAB rely on LAPACK algorithms to perform matrix operations,...
1
vote
1answer
58 views

Runge-Kutta fourth order method. Integrating backwards

I am using a Runge-Kutta fourth order method to solve numerically the usual equation of motion of a background scalar field in curved spacetime with a quartic potential: $\phi^{''}=-3\left(1+\frac{H^{...
0
votes
0answers
23 views

Divergence issues when using intrinsic cohesive elements approach

When I model the strain localisation of a microscopic sample (or say RVE ) with cohesive elements approach, the convergence performance looks very terrible. I have to use extremely time increments (...
0
votes
1answer
34 views

Shooting Method- Boundary value problem starting from -1 to 1

The equation is $\rho \frac{d \bar{u}}{dy} = -\frac{d\bar{p}}{dx} + \mu\frac{d^2\bar{u}}{dy^2} $ with boundary condition $u(-1)=0$ and $u(1)=1$ I am to solve it using fifth order runge-kutta ...
1
vote
0answers
45 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 ...
2
votes
1answer
74 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
56 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
41 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
46 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
42 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 ...
5
votes
1answer
42 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 ...
8
votes
2answers
195 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
83 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
69 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
2answers
96 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
110 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
97 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
81 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
19 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
44 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
72 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
62 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
54 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
57 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
59 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
34 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
303 views

Inverse of ill-conditioned 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
39 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
55 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]), ...

15 30 50 per page