All Questions

0
votes
1answer
14 views

Can ARPACK exploit hermiticity when diagonalising a complex matrix?

I have noticed arpack comes with a driver dsdrv1 that exploits symmetry of a real-valued matrix. Is there a way to analogously exploit a Hermitian matrix in some way via z--- drivers? The manual ...
0
votes
0answers
16 views

Matlab simulation: conflicting results

I have implemented a simulation of the model (for $i=1,\ldots,N$ representing nodes of a graph) $$\frac{d\omega_i}{dt} = P_i -\alpha_i \omega_i + K \underset{i \neq j}{\sum_{i=1}^N} \sin(\phi_i - \...
1
vote
1answer
32 views

What does the exponential function mean in numerical ode solving formulas?

I'm trying to read papers on numerical ode algorithms and I always seem to stumble upon huge amounts of exponentials multiplied by each other. For example in https://arxiv.org/pdf/1208.0689.pdf there ...
2
votes
1answer
35 views

What is ABA and BAB schemes when talking about numerical integrators

I have read a lot about numerical integrators (ode solvers) lately and tried reading a few papers but I have stumbled upon something that I can't understand and it's something called ABA and BAB. ...
0
votes
0answers
11 views

Attempting SOR and conjugate gradient with 2D BVP, is there something wrong with the problem? Or will matrix be ill-conditioned?

The goal is to use a Laplace equation to solve: $$a(x,y)(u_{xx} + u_{yy}) = f(x,y)$$ with boundary condition $u=0$ on the boundary $x:[-1,1] , y:[-1,1]$. The problem is that we are supposed to work ...
0
votes
1answer
72 views

How to make a less diffusive code to solve 2D advection equation?

I would like to solve the following differential equation numerically in 2D, $$\frac{\partial z^-}{\partial t}+(\vec{B}\cdot\vec{\nabla})z^-=0,$$ see Wikipedia if you are curious about what the ...
0
votes
1answer
48 views

How to write in paper the equations given by splinefit?

I am trying to write on paper the piecewise polynomials given by the splinefit function, but I am having some problems figuring out what the coefficients should be. ...
1
vote
1answer
52 views

Assessing numerical error in solving a least squares problem

I have a linear system of the type $$Ax = b$$ I want to minimise $|b - Ax|^2$. I know there are different approaches to directly solve the system (Normal equation + Cholesky, QR decomposition, SVD ...
6
votes
1answer
64 views

Finding the $i$-th largest eigenvalue of a matrix

Given a large matrix $A$ with eigenvalues $\sigma_1\ge \sigma_2 \ge \dotsc $, I want to determine only a subset of these values, say $\sigma_5,\sigma_8$ and $\sigma_{19}$. Is there an algorithm that ...
2
votes
0answers
22 views

Solver for generalized eigenvalue problem with multipoint constraints

We have the following generalized eigenvalue (set of) problem(s) $$[K_R(\kappa)]\{u_R\} = \omega^2[M_R(\kappa)]\{u_R\}\quad \forall \kappa \in [\kappa_0, \kappa_1]$$ with \begin{align} &K_R(\...
0
votes
1answer
35 views

Product of rank one updates as a low rank update for quasi newton/BFGS

I'm trying to improve the speed of the following iteration to calculate $s_k$: $$B_k^{-1} = \Bigg( I + \frac{s_{k}s_{k-1}^T}{||s_{k-1}||^2}\Bigg)...\Bigg(I+ \frac{s_1s_0^T}{||s_0||^2}\Bigg) B_0^{-1}\\...
0
votes
1answer
47 views

Solve multi-dimensional optimization problem using basinhopping

I am searching for an optimization solution, which is a 8d vector representing 4 complex elements, where each element is within the complex circle with maximal radius 1.2. The objective function is: ...
0
votes
0answers
27 views

Existence and uniquness of solution of FVM for Poisson equation

I'm discretizing the following Poisson equation using FVM where the domain $\Omega$ of the solution is a regular hexagon of side $1$ centered about the origin. $$\Delta u =k,\text{ $k$ constant}\\ \...
2
votes
2answers
63 views

Optimization techniques for expensive multi-variable functions

I'm working with a finite element model in which I'm interested to minimize the average temperature at a surface. I have 15 independent variables in my model, including geometry, materials, flows, ...
1
vote
0answers
62 views

Constraining the total volume in Finite Element Methods

I have a diffusion problem which can be broken down to be: $-\Delta u = f(u) $ on $\Omega ~/~ \Omega_{int}$ $u = 1$ on $\Omega_{int}$ Note that this is an internal Dirichlet constraint to the ...
0
votes
1answer
37 views

Elliptic PDE finite volume method with Dirichlet boundary condition

I want to discretize the following equation using a Finite Volume Method $$\nabla \cdot (a(x)\nabla u)=f(x)\\x\in \Omega \subset \mathbb{R}^2 \\u_{|\partial\Omega}=g$$ I'm using Voronoi cells here: ...
3
votes
0answers
40 views

MATLAB: Compute the Schwarz-Christoffel transformation symbolically

Suppose we have a conformal mapping from the unit disk in the $\omega$ plane onto the exterior of a polygon in the $z$ plane. The Schwarz-Christoffel mapping in this case is defined as: $$f(u) = A - ...
0
votes
0answers
67 views

Gaussian Elimination with Fortran 90 [on hold]

I am having some issues in implementing this sample code.Calculating the determinant of a matrix: ...
0
votes
0answers
64 views

Grid Data Interpolation

What are the most sophisticated methods for interpolating a scalar field say Electric or Magnetic Field on a 3-D grid? I have scalar data on a meshgrid with equal spacing. I would like to use an ...
0
votes
1answer
58 views

Python sequence cluster exercise

I am working through an exercise in my textbook and implementing the code in Python to practice dynamic programming. I feel like I am right on the edge of figuring it out, but after many hours, I come ...
-1
votes
0answers
27 views

Charged Particles within magnetic fields [on hold]

I am trying to code the motion of a charged particle within a magnetic field and produce a 3D trajectory plot. The problem I believe is that I need to fix the axes and limit the animation produced. I ...
1
vote
1answer
38 views

Linear elasticity modeling load using traction vs. mixed BC

In classical linear elasticity, when modeling a force/load boundary condition, it appears that we could either: Use a pure Neumann boundary condition, where the 3 traction components are specified. ...
0
votes
0answers
17 views

Implicit finite difference flow across across multiple cells

I am interested in solving a simple equilibration flow on a finite difference grid (i.e., non-uniform initial potentials/heads $p^t$, all boundaries no-flow). It is relatively easy to set up an ...
0
votes
0answers
24 views

How to subtract two non-closed surfaces from each other in VTK or ParaView?

I'm trying to subtract two surfaces, which are shown below in this image, by using VTK or ParaView. I'm aware of vtkBooleanOperationPolyDataFilter but that filter needs its inputs to be closed ...
1
vote
0answers
24 views

Does adaptive Gauss-Kronrod reuse function evaluations?

I'm curious to know how QUADPACK's QAG routine works. My understanding is that it begins by calculating on each subinterval the numerical quadrature with a Gaussian-Legendre rule and a nested Kronrod ...
0
votes
0answers
30 views

Boundary condition causing divergence

I am trying to solve a pressure Poisson equation using BiCGSTAB without preconditioning. When I use Neumann condition at all boundaries the solver converges but if I make one boundary as Dirichlet the ...
5
votes
1answer
167 views

What are the major differences between GMRES and FOM?

I am reading Professor Saad's "Iterative Methods for Sparse Linear Systems" (2nd edition). The basic algorithm for FOM is given on page 166 and the basic algorithm for GMRES is given on page 172. ...
0
votes
0answers
15 views

Access PETSc data in totalview?

Is it possible to view the data stored in the various PETSc data types from within totalview? Ordinarily, PETSc types are integers which act as pointers to the actual data (obviously my understanding ...
0
votes
0answers
26 views

Algorithm to determine flat surfaces and camera orientation without specialized hardware

Modern augmented reality platforms such as Google's ARCore and Apple's ARKit seem to only operate on mobile devices, I'm guessing, because their underlying algorithms require specialized hardware that ...
0
votes
0answers
29 views

Why is this MM_multiplication called numeric quadrature?

Link:https://github.com/romeric/Fastor/blob/master/benchmark/benchmark_backend/benchmark_matmul.cpp In this test, the author calls this benachmark a test similar to numerical quadrature. Why is that, ...
0
votes
0answers
11 views

How to choose metrics for evaluating classification results?

Recently we have developed a python library named PyCM specialized for analyzing multi-class confusion matrices. A parameter recommender system has been added in version 1.9 of this module in order ...
2
votes
0answers
42 views

Richardson's Iteration, Gradient Method and Spectral Radius

Richardson's iteration introduce a scalar $\alpha$ to the update formula: $$ \textbf{x}^{(k+1)} = \textbf{x}^{(k)} + \alpha \textbf{r}^{(k)} $$ And compute $\alpha$ by minimizing the spectral radius:...
2
votes
1answer
180 views

MATLAB: Faber approximation of the matrix exponential to solve Liouville-von-Neumann equation

EDIT: I moved the full code to my github page so the post can be read more easily. I am writing a script to take the Faber approximation approach outlined in Hassan Fahs paper (free access) and apply ...
2
votes
1answer
54 views

Right-preconditioning and fixed point linear iterations

Given a linear system $A\textbf{x}=\textbf{b}$, we can express it into the easier-to-solve right-preconditioned form: $$ AM^{-1}\textbf{y}=\textbf{b}, \quad \textbf{y}= M\textbf{x} $$ On the other ...
0
votes
0answers
22 views

Extrange work on waves

I have been ask to do a work where some people are trying to compare experimental results with numerical ones. The experiment consist on a plate which has 7 sensor and 1 actuator that produce a wave. ...
0
votes
1answer
75 views

Finite Element - Flux Calculation

I am solving an advection-diffusion equation using the FEM and am having trouble calculating my fluxes. I start with the equation, $$\frac{\partial n}{\partial t} = \frac{\partial j_{n}}{\partial x}\...
1
vote
1answer
97 views

LAPACK equivalent on c++ , which is the best one? [duplicate]

I am following a course of computational material physics. The professor uses fortran to code and uses lapack to solve eigenvalue problems. So far I just know c++. There is an equivalent library that ...
1
vote
1answer
40 views

Harmonic oscillators with periodic boundary conditions

I am trying to simulate multiple harmonic oscillators in periodic boundary conditions (subsequently visualizing the process in VMD). I have successfully simulated multiple HOs by using the Leapfrog ...
0
votes
1answer
20 views

Want to make sense of array dimensions in logistic regression algorithms

I am trying to implement a simple logistic regression algorithm from scratch in python (for learning purposes). Every article I've seen online so far presents the following expression for $z$ (...
2
votes
1answer
27 views

Incorporating a potential barrier in a wave-packet simulation (Fourier Transform method)

I'm trying to simulate the scattering of a wave-packet at a potential barrier in Python. I'm using a Fourier Transform method (not sure if its the same as the Split-Step method), where I apply Fourier ...
-1
votes
0answers
16 views

Pseudo R2 value in R when removing missing values

I'm working with a logistic regression model in r model<- glm(response~ . , family= "binomial", data) and I'm using- DescTools::PseudoR2(model, which= "Nagelkerke") to get an estimate for model ...
4
votes
2answers
181 views
+100

Fast evaluation functions given by straight-line programs

I have a simple but long function that takes a vector x[10], and outputs a vector y[100]. It is an automatically generated eval function for a multivariate polynomial, ie, there is only (complex) ...
0
votes
1answer
34 views

How do I get power from gaussian beam numerically?

I would like to get the power from a Gaussian beam given a set of points at which electric field is evaluated. Please follow my reasoning and tell me what assumption maybe are wrong Power definition ...
1
vote
3answers
114 views

Find a solution of large system of inequalities

I have a large system of homogenous inequalities involving 33 real unknowns of the form $$ \vec{F}(z_i)^T \cdot \vec{X}>0\, $$ where $\vec{X} = \left(x_1,...,x_{24}\right)^T$ are the unknowns and ...
0
votes
0answers
9 views

What to call an analogous limiting reagent?

I'm trying to find either an Excel function or some other calculator that will tell me the number of possible complete combinations/sets of an item given amounts of components. I'm a high school ...
2
votes
1answer
51 views

Parallelizing FEM for elliptical PDEs with n >1

For a little personal project, I am picking up my FEM skills again. I learned a lot about the theory back in university and I am able to implement a simple FEM solver for specific problems but I was ...
0
votes
0answers
21 views

Roller boundary conditions in a 4 or 3 point bend test

I came across this post Boundary conditions in a four point bend test I don't have the reputation count to comment, so I'm making a follow-up post. I am curious about @Bill Greene's comment under ...
2
votes
0answers
42 views

Non-parametric models as solutions to Partial Differential Equations

In the realm of scientific computing, there are a plethora of techniques developed to solve Partial Differential Equations (PDEs). Many of the popular methods are variants of common techniques such as ...
0
votes
1answer
73 views

Actual global error vs theoretical global error: How to combine theory with practice

I have implemented an Adams Bashforth 4 method to solve an Initial Value Problem for an ODE and I am testing it against the test equation: $y'=\lambda y$ with $y(0)=1$ with the exact solution: $y(t)=...
3
votes
0answers
26 views

Detecting blocks in non-linear system of equations

When solving systems of non-linear equations using Newton's method, it is often observed that the system has an independent sub-system, e.g. : $$ f(x,y) = 0 $$ $$ g(x,y) = 0 $$ $$ h(x,y,z) = 0 $$ If ...

15 30 50 per page