# All Questions

8,029 questions
Filter by
Sorted by
Tagged with
97 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: ...
32 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 ...
29 views

17 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/...
15 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 ...
20 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 ...
96 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 ...
53 views

72 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 ...
59 views

### How to implement the following Finite Element method for Burgers' equation?

I am trying to replicate this result. It involves using the Galerkin finite element approach onto the viscous Burgers' equation. However, my implementation (in R) seems to be giving me wrong results....
33 views

### Equivalent of multiple-scale analysis for a linear ODE

I came across the method of multiple-scale analysis and was intrigued, because I am trying to solve a linear ODE with multiple characteristic timescales. When I apply the method as described, say, ...
45 views

32 views

### Grids for atmosphere simulation with finite volumes on the globe

I am currently in the early construction process of building a simple CFD model of a rotating planetary atmosphere. The planet should be allowed to tilt significantly, so that a time-dependent source ...
28 views

### Implementation of Lanczos method that returns tridiagonal matrix

The Lanczos method can be used to obtain extremal eigenpairs of sparse symmetric or hermitian matrices. I know there are several implementations of the Lanczos method (as well as Arnoldi, Davidson, ...
39 views

### Incomplete LU decomposition of sparse matrix

I have a sparse matrix stored in CSR format. For this matrix, I would like to get the incomplete LU decomposition. I tried to find algorithms which can utilize the CSR format but I could not find ...
33 views

### Least square approximation of a polynomial with a constraint on the derivative in Python

I'm trying to fit a polynomial of the third degree through a number of points. This could be a very simple problem when not constraining the derivative. I found some promising solutions using CVXPY to ...
102 views

12 views

### Error on the fit parameters when several good fits exist

I am using the reduced chi-squared statistic to determine the goodness of fit. I run several simulations and determine that a parameter 'p' has a certain range of values that all give values between 0....
51 views

### Finding curves where function goes to zero in two dimensions

Suppose $f(x,y)$ is a complex function of two real arguments with roots* that are not discrete points but lie in curves. (Is there are term for this characteristic?) An example is shown below: the ...
74 views

### Sensitivity of BFGS to the accuracy of the gradient

I am studying how to speed-up the BFGS method using quantum computing techniques. I have used a method of speeding up the gradient of the function, but it sacrifices the precision value of the ...
51 views

### Givens rotation vs 2x2 Householder reflection

The usual story of Givens rotations vs Householder reflections is that Householder reflections are better if you want to map a long vector to $e_1$, while Givens is better if you want to map a 2-...
22 views

### Fast convergence of smoothing of periodic noise

I have essentially periodic data from a simulation (not exactly periodic but is qualitatively fairly periodic), and I'd like to take an average or noise filter of some sort that I can get a well ...
62 views

### How to include penalty in a Objective Function with Python? GEKKO

I'm trying to include a "great M" penalty in my objective function. I want use the entry x vector values as entry values in a function. A fixed maximum value is took initially for the returned value ...
61 views

### Best way of storing numerical data in a compact manner, while leaving it accessible for tools like GnuPlot?

My simulation, written in C++, generates a large amount (roughly ~500) of text files for each set of parameters I try to simulate, with four columns of ~5k double values in each file. Furthermore, to ...
274 views

### Iterative linear solver for “ugly” saddle point system

I am a graduate student majoring scientific computing. The numeric model I made caused a very ugly-looking saddle-point linear system. It is not symmetric at all and I will attach the sparsity pattern ...