All Questions

0
votes
0answers
25 views

Fit exponential convergence

I'm working with a numerical algorithm whose output $y$ asymptotically approaches a certain unknown value $a$. I expect an exponential convergence, i.e. the data $y$ given by my algorithm should be ...
0
votes
0answers
21 views

Simulating Anderson model, have problem with momentum representation (MATLAB)

I want to change from real-space representation to momentum-space representation I have a Hamilton-operator (Anderson-model), and I calculated some kind of entropy of its eigenstates (this is working, ...
-1
votes
0answers
55 views

Heat Equation: Analytic form and numeric form

I am writing a program to compare analytic and numerical solutions for some points. How can I write the numerical form to compare using the cited algorithm? This is the analytical form I did. $$\frac{...
1
vote
0answers
29 views

Dealing with spurious oscillations in particle tracking methods

I work on modelling high intensity discharge xenon-filled lamps. The model governing the discharge is quite complex and sadly includes fluid dynamics. After some time, I managed to implement a finite-...
4
votes
1answer
146 views

Accurate way of getting the square root inverse of a positive definite symmetric matrix

What is the most accurate algorithm to get the square root inverse of a positive definite symmetric matrix? I am not looking as much for efficiency, though using quadruple precision computation is out ...
3
votes
1answer
140 views

What are all these functions in FEM? Shape function vs Basis Function vs Trial Function vs Test Function vs Interpolation Function

I am a novice in FEM. I have some experience with FDM which was pretty straight forward. Since I have a confusion with a number of concepts, I will try to break them down by writing down what I have ...
2
votes
2answers
161 views

Compiled c++ code runs much faster with double than float. Explanation?

I am still rather new on here and I hope question is suitable for this forum otherwise please help me migrate it to greener pastures. I am an electrical engineer specializing in applying mathematics ...
-1
votes
0answers
24 views

How to perform improved euler integration for a 3D vertex model (network minimization)?

I am a PhD student who is struggling to implement a 3D vertex model. Vertex model are commonly used by physicists in biology to understand how biological cells in a tissue coordinate together. In the ...
1
vote
0answers
40 views

Computing Trajectory Equations of Kerr Geodesics

I want to numerically solve the trajectory equations of a Kerr geodesic given by wikipedia in Matlab. The trajectories look like: I implemented the equations and solved it with the standard Runge-...
0
votes
1answer
55 views

Chip testing problem

An engineer has n supposedly identical integrated-circuit chips that in principle are capable of testing each other. The engineer test jig accommodates two chips at a time. When the jig is loaded, ...
5
votes
0answers
45 views

CHOLMOD condition number estimate

The CHOLMOD library provides a CHOLMOD_rcond function that estimates the reciprocal condition number (in the one norm) of a symmetric positive definite matrix from ...
0
votes
0answers
6 views

Compute cell values and isosurface constant from density values of particles

I am trying to reconstruct the surface for a fluid simulation based on a list of particles using the Marching Cubes algorithm. From different resources, such as http://paulbourke.net/geometry/...
1
vote
1answer
52 views

Pivoted Cholesky vs Modified Cholesky

I am solving nonlinear least squares problems with the normal equations approach, so on each iteration, I need to solve: $$ J^T J \delta = -J^T f $$ for the step $\delta$, where $J$ is a large (...
0
votes
1answer
74 views

Relation between Stress/Strain and normal derivative of displacement

I calculated the stress $\sigma$ and strain $\varepsilon$ for a solid plate with dirichlet boundary conditions $u = g$, where $u$ is the displacement. With these I want to calculate $\nabla_n u = t$ ...
0
votes
0answers
34 views

Stokes Equation fails to converge for an ellipse

This might be because of the mesh, but the following code blows up for all values of b not 1. Does anybody have any experience working with the ellipse mesh in Fenics? ...
1
vote
2answers
57 views

identifying peaks in data

I have data with peaks on some background, for example: The two prominent peaks at ~390 and ~450, as well as the much smaller peak at ~840. What are some options to programmatically find the position ...
3
votes
1answer
51 views

Plug-and-go Clebsch-Gordan computation in python?

I started a little project in python, under the assumption that it would be easy to find a routine for numerically computing Clebsch-Gordan coefficients in some library such as scipy. When it came ...
1
vote
1answer
69 views

Finite difference methods

I am currently applying the finite difference method to the solution of the diffusion equation. I think that a problem has occurred, and is as follows, my explicit method is the most accurate when ...
2
votes
1answer
45 views

Residual value goes to NaN while solving a system of nonlinear equations

I am solving a system of coupled nonlinear equations using Newton's method, similar to $$\begin{split} c_A(A, B)\partial_tA&=\nabla\left(k_A(A, B)\nabla A\right) + f_A(A, B, t)\\ c_B(A, B)\...
0
votes
0answers
26 views

Obtaining integer digits using the GNU Multiprecision Arithmetic Library (gmplib)

I'm using the GNU Multiprecision Arithmetic Library (gmplib) for some experiments in computational mathematics. I want to extract, and manipulate, the base-b digits (with 2 <= b <= 10) of ...
0
votes
1answer
49 views

How to check experimental data against a theoretical curve? (Python)

I am trying to check the agreement of a dataset against a theoretical curve, specifically a bandstop filter in an RLC circuit. I have generated a function which describes the curve we expect from the ...
2
votes
2answers
136 views

Automatic timestep adjustment in a CFD solver

I have developed my own 3D Finite Volume Navier-Stokes solver based on projection method for nonuniform grid. I am looking to incorporate automatic timestep adjustment at each time step based on ...
2
votes
1answer
136 views

Forward and backward integration — cause of errors

I write a test program to integrate foward on $[0,T_f]$ and then backward on $[T_f,0]$ from the endpoint of the forward integration an Hamiltonian system: $$ \dot q(t) = \frac{\partial H}{\partial p}(...
-1
votes
0answers
15 views

finding rotations between 2 points in COMSOL

So I have the results of an eigenfrequency analysis, and would like to find out how much an object has rotated in a certain plane. For instance, in the picture below, I'd like to find out how much the ...
0
votes
0answers
29 views

How to show equivalence between two programs?

Consider the following space $A = \{(x_1,x_2,x_3)\in \mathbb{R}^3|x_1+x_2+x_3 = 1\}.$ Then say that we want to minimize a function $J(y):\mathbb{R}^{3}\to \mathbb{R}$ subjected to the constraint that $...
0
votes
0answers
22 views

Finding the polynomial for the solution of an ODE

I’m stuck trying to solve part (b) and (c) of the below problem, but part (b) is the one of main concern here as I think (c) should follow easily once (b) is completed. I don’t know where to start ...
1
vote
0answers
37 views

Finite dimensional optimization problem over dynamical system

I am interested in solving numerically the following mathematical problem Consider an ode of the form $$ \dot q(t) = f(q(t),t_1,\ldots, t_N),\qquad t\in [0,T], $$ where $q\in \mathbb{R}^n$ is the ...
6
votes
1answer
98 views

Is there any explicit symplectic Runge-Kutta method?

As far as I know, all the symplectic Runge-Kutta methods are implicit which need to solve non-linear equations during the calculation. Is there any explicit method? If not, why?
-1
votes
0answers
41 views

What kind of standard deviation must be used in optimization algorithms?

I would like to ask about the standard deviation of objective function value. There are two types of standard deviations ° Population standard deviation ° Sample standard deviation In ...
4
votes
2answers
67 views

How to efficiently invert $K \otimes M+I_T\otimes \Sigma$?

I'm looking for a way to efficiently invert $$K \otimes M+I_T\otimes \Sigma$$ where the inverses for $M,K$ exist. $I_T$ is the identity matrix of dimension $T$, and $\Sigma$ is a diagonal matrix, with ...
2
votes
1answer
46 views

Automatic differentiation via ADOL-C and the Heaviside Function

I am writting a c++ program in which I define a function $$\displaystyle F(t) = \sum_{i}r_i\,H(t-t_i)$$ where $H$ is the heaviside function, $t_i$ are optimal parameters which are mutable. The ...
0
votes
0answers
48 views

Strange spectral (finite) element results of a solid plate

I tried to implement the spectral element method1 as proposed in [1]. I simulated an aluminum plate and a vertical concentrated force was applied at the middle of the top left quarter of the plate2. I ...
5
votes
0answers
93 views

How to solve a 4th order nonnegative LASSO problem?

I need to solve the following 4th order nonnegative LASSO problem: $$ \min_{x \geq 0} \quad || |Ax|^2 - b ||^2 + \lambda ||x||_1 $$ where $|\cdot|^2$ denotes element-wise squared. $A$ is small size (e....
0
votes
0answers
32 views

Neumann boundary conditions on arbitrary surface for finite difference diffusion

I am facing the following problem, formulated in practical terms: I have a region $\Omega$ in two or three dimensions, represented as a binary mask, and an initial density $u_0$ within that region ...
0
votes
1answer
57 views

Is “Gradient Computation” in Finite Volume Discretization Really 2nd order accurate?

Based on this, pp 245, we go through these steps to discretize a gradient statement, namely $\nabla\phi$: 1- Gauss theorem reads, $$ \int_V\nabla \phi dV = \oint_{\partial V}\phi dS $$ 2- Integral ...
1
vote
1answer
42 views

Demagnetizing field using scalar potential method

I want to calculate the stray magnetic field from a ferromagnet using the scalar potential method (1). The problem consists of a ferromagnetic cuboid divided into small cuboidal cells in which the ...
7
votes
0answers
54 views

How reproducible are conda environments?

I am aiming at keeping my scientific studies and analyses reproducible: I am automating them as much as possible, I am sharing them, and I sharing them together with the execution environment(s) I've ...
1
vote
1answer
54 views

Online Parameter Estimation using steepest descent

I have a first order system which is described by the following differential equation: dx/dt = -a*x + b*u where u is the input <...
-2
votes
1answer
77 views

How to : numerical integration by quadrature in C language / remove NaN

What I wanna solve it the problem following ( by quadrature method ) I want to get two arrays of data ( z & tau ) from z[0], tau[0] to z[2249], tau[2249]. Since the integrand diverges at z=0.9, ...
1
vote
0answers
21 views

Metis: how to use and tutorial recommendation

I am new to METIS and trying to use it in my fortran code. I read the manual online. But still, I am not sure about how to implement it my code. I tried the test cases in the graphs directory. For ...
0
votes
0answers
73 views

Second derivative using Fornberg finite difference method

I have some discrete data, non-equispaced in x, y=f(x). I want to use a numerical finite difference method to calculate the second derivatives of y, at some point. I am using the Fornberg method, ...
0
votes
1answer
31 views

Plotting ratings matrix

Hello fellows and folks. I have been looking to do this for 1 month and still cannot find the way to do it. Here’s what’s going on: I have a csv file called ratings.csv with the following ...
2
votes
1answer
35 views

Discretization with non-constant matrix containg entries form unknown vector

Consider a system of PDEs $$ \begin{cases} u_t = \nabla \cdot (D(u)\nabla u) + \frac{c}{K_U+c}u-ku\\ c_t = d_c\Delta c -\frac{\nu_U c}{K_U + c}u \end{cases} $$ with some boundary conditions. Here, $D(...
4
votes
1answer
36 views

Single-variable multimodal derivative-free optimization (for a well-behaved function)

Are there well-established approaches to single-variable multimodal optimization? Given $f:\mathbb{R}\rightarrow\mathbb{R}$ that: has several local minima within a given range of interest $[a,b]$ is ...
1
vote
0answers
45 views

Numerically Approximating the Jacobian and Comparing the Eigenvalues With Analytical Form

I am trying to study the stability of numerical discretization schemes using the Jacobian matrix of the residues with respect to the vector of conserved variables. For a simple diffusion equation ...
0
votes
0answers
26 views

Density functional theory: Total energies and forces

In DFT, forces are calculated using the Hellman-Feynman theorem, such that: $$\frac{\text{d} E_\lambda}{\text{d} \lambda} = \left \langle \psi_\lambda \left|\frac{\text{d} \hat{H_\lambda}}{\text{d}\...
-1
votes
0answers
24 views

Nevergrad not assessing bounds properly

I'm using Nevergrad by Facebook in Python and am observing some strange behaviour relating to bounds. Let's find the minimum of a standard simple function: ...
1
vote
2answers
85 views

Creating 3D Mesh from stl files with gmsh

After long hours of searching for an answer I thought it might be better to ask the community. The problem I have is that I need to convert STL files to mesh files. I know that I therefore need to ...
0
votes
1answer
46 views

Training accuracy improves but test set accuracy remains the same

I have built an ANN model with 5 hidden layers and 100 nodes in each layer to solve a multilabel classification problem. After the first run, I get a training accuracy of ~66% and a test set accuracy ...
4
votes
2answers
112 views

Is saying “math modeling and numerical simulation” wordy and redundant?

I'm describing some work on my website, and I'm wondering if my math modeling and computer simulation work is described ok: I say math modeling and numerical simulation. Should I say "...

15 30 50 per page