All Questions

7,596 questions
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 ...
16 views

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: ...
27 views

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: ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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, ...
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 ...
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:...
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 ...
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 ...
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. ...
75 views

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}\... 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 ... 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 ... 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 (... 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 ... 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 ... 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) ... 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 ... 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 ... 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 ... 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 ... 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 ... 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 ... 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)=... 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