All Questions

Filter by
Sorted by
Tagged with
2
votes
0answers
45 views

Interesting maxmin mixed integer/real quadratic optimization problem

I have the following problem: $ \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \argmax_{\underset{\lambda_k\in \mathbb{R}}{\sigma_q^2(k)\in \mathbb{R}}} \left[\...
2
votes
1answer
119 views

Which statistical method should I use for comparing machine run-time of two algorithms?

I am comparing the run-time of two algorithm by solving different instance of the problems. Sample of my data: ...
11
votes
0answers
3k views

Optimized open source BLAS / LAPACK package

I was wondering what is a more optimized open source BLAS/LAPACK package with respect to modern multi-core processors (Haswell and beyond). Is there any distribution that can attain performance close ...
2
votes
0answers
42 views

Understanding MP-PIC implementation in OpenFOAM

The multiphase particle-in-cell (MP-PIC) method is characterized by mapping particle properties from the Lagrangian coordinates to the Eulerian grid. However, the implementation of this method in ...
3
votes
2answers
84 views

ode45 with matrix initial conditions

EDIT: We have a coupled system of 10 ode each. The coupling presents in the last equation. I thought about using a matrix 10 by 2 as initial conditions. I also followed a similar question with the ...
1
vote
1answer
38 views

Algorithm for evaluation of spin-weighted spherical harmonics

Is there an algorithm to evaluate spin-weighted spherical harmonics (swSH) at arbitrary points on the sphere? In particular I am looking for, e.g. a recursion relation to evaluate the "spin weighted ...
3
votes
1answer
263 views

A fast and efficient algorithm for eigenvalues computation of a symmetric positive definite matrix

I am looking for a very fast and efficient algorithm for the computation of the eigenvalues of a 3x3 symmetric positive definite matrix. the algorithm will be part of a massive computational kernel, ...
1
vote
0answers
25 views

Finite difference/element method : time step and spatial resolution close to a finite singularity

I'm using the finite element method (FEM), but my question is quite a global question. It's related to this question but it is not the same. Let's assume we have this equation : $$\partial_t c - u\...
3
votes
0answers
80 views

numerical instabilities in Fluid Dynamics, Finite Element Method

I'm looking for references to understand where the numerical instabilities come from in hydrodynamics in general, and notably when the Péclet number: $Pe>1$. I'm using the finite element method. ...
4
votes
1answer
67 views

Diagonalize a unitary matrix with orthogonal matrices using numpy

An important component of the Cartan KAK decomposition for 2 qubit operations is to diagonalize a 4x4 unitary matrix using orthogonal (not unitary, purely real orthogonal) matrices. That is to say, ...
8
votes
1answer
123 views

Eigenvalue-like problem with coupled ODEs

I am looking at the following system of ODEs: \begin{array}{r}{\left[c_{2}(k)-\partial_{\tau}^{2}\right] \varphi_{2}\left(\tau \right)=f_{21}(\tau) \varphi_{1}\left(\tau \right)} \\ {\left[c_{1}(k)-...
1
vote
0answers
51 views

Derivatives over a Finite Element mesh

I have a data extracted from Comsol on some node points and I know the coordinates of each node. Does anyone know how Comsol calculate the partial derivative from the values at each node and also ...
0
votes
0answers
38 views

FEniCS implementation of Maxwell equations for a dipole antenna

someone knows where I can find a FEniCS implementation of Maxwell equations for a dipole or other type of antenna? I mean a dipole antenna with an arbitrary geometry of every 'leg' in the dipole.
1
vote
0answers
39 views

Predictor-Corrector vs. Deferred Difference Corrections

I want to use the Numerov method but keep higher-order terms from the Taylor expansions. In the literature, I found the term "Deferred Difference Corrections" for the procedure of first solving the ...
1
vote
3answers
119 views

Clustering with points lying along different 3D planes

I have a bunch of data points in 3D that lie along a few planes. What would be the best approaches to estimate the normals of these planes? Edit: There are roughly equal number of points lying along ...
2
votes
0answers
50 views

Numerical integration of SDE: choice of $dt$ and algorithm

I am working on the following Stochastic Differential Equation (SDE) in the Quantum Mechanics context: $$dX_{t} = a X_{t} dt + b X_{t} dW$$ where $X_{t}$ is my stochastic varible, $dt$ is my ...
1
vote
1answer
50 views

ADMM: why does method of multipliers lose decomposability

I am trying to understand intuition of ADMM (alternating direction methods of multipliers). It combines dual ascent and method of multipliers. Downside of method of multiplier is the loss of ...
1
vote
1answer
32 views

Weighted moving variance

i have a time-series and, in analogy with exponentially weighted moving average, i would like to compute the exponentially weighted moving standard deviation or variance in an efficient, numerically ...
1
vote
1answer
69 views

Average value divergence in spectral method for Poisson equation

I'd like to know how to deal with a divergence when trying to solve the Poisson equation for electrostatics with a simple spectral method. I'm not sure how to best state my problem, so I'll explain ...
0
votes
1answer
45 views

why on wolframAlpha I cannot find the value of an expression?

I would like to calculate the following two expressions using Wolfram Alpha: $$z = (x (d^2 + d (4 y - 6) - 8 y^2 + 12 y - 3) + 6 (d - 1) (y - 1) y)/(d^2 - 2 d y + 4 y^2 - 6 y + 3)$$ and $$w = -(\...
0
votes
1answer
101 views

Is this a knapsack problem?

I have a set of $K$ keywords. Each of this keywords can have set of bids from $1\$,\dots,N\$$. For each bid for a keyword, it will get a specific amount of clicks and a specific cost. Clicks and Cost ...
4
votes
1answer
48 views

Determine image of hypercube under linear map

Let $A$ be an $3\times N$ matrix (where $N$ is large) with nonnegative real entries. I'd like an algorithm for determining when a vector $v\in\Bbb R^3$ can be written as $Aw$ for some vector $w\in\Bbb ...
1
vote
2answers
95 views

simulation outputs differ across hardware platforms

We've recently ported our Python/Fortran simulation code to a new supercomputer. Some (not all) of the tests (simulations) that we've run on the new platform yield results that are significantly ...
0
votes
1answer
58 views

Optimize multivariable function with interdependent variables

I have a cost function with 2 parameters. The variables are dependent on each other. So, if I just take a partial derivative with respect to one variable the slope is in terms of the other variable ...
0
votes
1answer
45 views

The proper way to assess the error of Jacobi iteration (for 2D Poisson equation)?

Motivation: I'm using 2D regular grid (it's actually a quadtree but I can still treat it as a finite difference thing if I weight-average the solution over smaller scale cells for the purpose of ...
1
vote
2answers
128 views

Fastest algorithm for pseudoinverse of skinny matrices

For a performance-sensitive problem, I need to compute the pseudoinverse of a skinny matrix (#rows = 1000–10000, #cols= 10–20). I already employ the traditional SVD econ method. For some problem ...
3
votes
1answer
127 views

Why do many people use FDM method to solve Stokes equations, i.e., saddle point matrix?

For numerical methods of the Stokes equations, with appropriate boundary: $$-\nabla^{2} \vec{u}+\nabla p=\overrightarrow{0}$$ $$\nabla \cdot \vec{u}=0$$ one may use FDM (finite difference method) ...
2
votes
1answer
119 views

Implementation of Jacobi iteration

I have implemented the Jacobi iteration in C++ using a dense vector and a sparse matrix in CSR format. The code is as follows: ...
4
votes
1answer
547 views

Help with Fourier beam propagation method

I am working on implementing the Fourier beam propagation method in C++. I am really more of a programmer than a physicist but I think I have a good understanding of what I am trying to do. Here is ...
1
vote
1answer
148 views

Lower bound for bilinear form in FEM

I'm searching for lower bounds of bilinear forms arising in FEM for elliptic second order PDEs with mixed boundaries. I did some research and found: $$\max_{v_{h}\in\mathcal{V}_h(\mathcal{\Omega})}a(...
3
votes
1answer
36 views

Robust ways to find zeros of the Tricomi confluent hypergeometric function as a function of its parameters

I'm solving a quantum mechanical problem, and the quantization condition requires me to solve the equation $$ U\left(\frac12(\ell+1-E), \ell+1, r^2\right) = 0, $$ where $U(a,b,z)$ is the confluent ...
1
vote
0answers
29 views

Multipole expansion for magneticfield intesity (magnetization)

I'm using the Barnes Hut method to calculate the magnetic vector potential induced by an applied current. Given as: $\begin{equation} A(r) = \frac{\mu_0}{4\pi} \int_V\frac{\bf{J(r')}}{|r-r'|}dV(r') \...
1
vote
0answers
23 views

Solution errors when refining a static grid: Continuous vs. step-wise refinement

Let's assume I am working on a 2-D domain on $R^2$, with my coordinates $x \in[-1,1]$, $y \in[-1,1]$ and I want to solve a popular CFD problem, like the shallow water system or the Euler system. At $x=...
3
votes
2answers
579 views

Convergence problem for Poisson equation with periodic BC

I have written Poisson solvers using two different methods: A classic Jacobi scheme and one using the multigrid solver Hypre. I made up a couple of test cases ensuring the validity of those solvers. ...
2
votes
1answer
77 views

Number of GMRES iterations increase when stepping forward in time, using the Newton method

I am solving a system of nonlinear time-dependent equations using the Newton method in a finite-element-setting, i.e. first I create the jacobian matrix for the current time, and afterwards I try to ...
16
votes
2answers
1k views

Boost::mpi or C MPI for high performance scientific applications?

The thing I dislike most about MPI is dealing with datatypes (i.e. data maps/masks) because they don't fit that nicely with object oriented C++. boost::mpi only ...
35
votes
7answers
66k views

Parallelizing a for-loop in Python

Are there any tools in Python that are like Matlab's parfor? I found this thread, but it's four years old. I thought maybe someone here might have more recent experience. Here's an example of the ...
1
vote
0answers
18 views

Orientation of cones and transitive closures of a dmplex in Petsc

From the Petsc manual pages, I fail to understand what the orientations of cones and transitive closures mean. In particular, how can I relate these numbers to the orientation of the length/area/...
2
votes
2answers
138 views

Why iterative method: AMG preconditioned PCG is slower than Matlab direct method 'A\b'?

Recently, I have met a question that a saying goes that for large linear system: iterative methods are required because of memory problem of direct methods. But when I implement some experiments ...
14
votes
1answer
2k views

How to Run MPI-3.0 in shared memory mode like OpenMP

I am parallelizing code to numerically solve a 5 Dimensional population balance model. Currently I have a very good MPICH2 parallelized code in FORTRAN but as we increase parameter values the arrays ...
4
votes
1answer
122 views

Improve Mandelung constant code

I'm learning and improving my Python skills. I did a program in Python about Mandelung constant. But, I'm having kind of a problem. The Mangelung constant is calculated using this sum: $$ V_{total} =...
0
votes
0answers
19 views

Inconsistent potential over a cylindrical surface in COMSOL

I made the following construction in COMSOL (This is a cut): Two cylinders, the inner one in the middle is a solid cylindrical conductor. The thick outer cylindrical shell, along with the two small ...
1
vote
1answer
127 views

Cholesky for ill-conditioned/singular covariance matrices

Can someone suggest a way to get Cholesky factorization of a singular covariance matrix? I need it to match Cholesky on full-rank matrices, ie coordinate order should be preserved. My attempt below ...
4
votes
1answer
54 views

approximate function such that the inverse of the approximation is “simple”

I have a smooth enough injective function $f:[a, b]\to \mathbb{R}$ which I want to approximate by something that can be computed quickly, e.g., a Padé approximant of low degree, $$ \frac{\sum_{j=0}^m ...
0
votes
0answers
21 views

On using Ritz Method to solve a Mindlin–Reissner plate

I am trying to replicate the method given in the this paper. I have written a Matlab program which determines the displacement field of Mindlin–Reissner plate theory using Ritz method. The limitation ...
0
votes
1answer
303 views

Nonlinear integer program with linear constraints

I'm trying to perform inference over a subset of the latent variables of a hierarchical hidden Markov model I built. I've derived the relevant optimization problem, but it's a pretty nasty piece of ...
1
vote
2answers
111 views

How to compute 16 different simulations on parallel with pbs script on the same machine

I have a 32 cores machine, and I need to run 16 different dynamics simulations in parallel on it. I want the 16 jobs to run in parallel, not sequentially, on the same machine. The 16 dynamics input ...
2
votes
0answers
37 views

Inverses of many standard subspaces of one large matrix

i have a large rectangular invertible matrix M (about 5000x5000) and i have a loop in which i do the following for each iteration i (there are about 6000 iterations): i am given a subspace S_i (which ...
0
votes
1answer
77 views

What's a time centered Riemann problem?

I am trying to understand the meshless methods as described in https://arxiv.org/pdf/1409.7395.pdf. I'm having trouble understanding the following step: (Page 7, just after equation 17) Now, rather ...
1
vote
0answers
20 views

Second fundamental form - Maple

I would like to know the command/line in Maple 16 or similar to obtain the second fundamental form tensor for a given metric. I've managed to obtain Rienmann and Ricci tensor, even Weyl, but I can't ...

15 30 50 per page