Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

Intel MKL results differ depending on the underlying hardware architecture [closed]

I think this is a well known problem that when using MKL_CBWR=AUTO, the results may differ across different hardware architecture due to the floating point ...
roulette01's user avatar
1 vote
1 answer
57 views

Monotonicity of Errors with Respect to Step Sizes in Numerical Methods for PDEs

Consider a non-linear partial differential equation (PDE) (e.g., Burgers' equation) that is solved numerically using a finite difference method (or a similar approach). Suppose a grid search is ...
user572780's user avatar
1 vote
0 answers
38 views

Using of elastic tangent for structural nonlinear solver

I noticed that some finite element programs, such as Plaxis, do not require the constitutive law to return the consistent tangent, but elastic tangent seems to be sufficient. In my experience, using ...
kstn's user avatar
  • 241
0 votes
0 answers
45 views

Calculating a 2D Ewald sum for a multipolar expansion

I am attempting to calculate the potential of a particle at the center of an infinite two-dimensional lattice as per the following reference: Reference: Lambin, PH & Senet, P. Ewald Summation of ...
JasonC's user avatar
  • 33
6 votes
2 answers
941 views

Implementation of Monte-Carlo Integration

After reading the Wikipedia page for Monte-Carlo integration, I have understood the basic idea but I am having trouble implementing it for a general case. The integration that I am trying to do is $$ \...
Michael's user avatar
  • 61
1 vote
1 answer
111 views

Different Results for Double Pendulum

In this study, (Hidden Fractals in the Dynamics of the Compound Double Pendulum) the authors provide various fliptime fractals (of a double pendulum) for different length combinations. However, when I ...
MaximeJaccon's user avatar
2 votes
1 answer
70 views

Computing the Fiedler vector of a large, sparse graph

I have a sparse, undirected and unweighted graph $G$ of size $n$, with $n$ on the order of say several million. I would like to compute the Fiedler vector $f$ of $G$, which is the eigenvector ...
Set's user avatar
  • 503
0 votes
0 answers
24 views

Help in solving Quintessential scalar field using Steep Potential in cosmology

I am attempting to solve the differential equation $\ddot\phi + 3H\dot\phi + \dfrac{dV}{d\phi} = 0.$ For $V(\phi) = V_{0}e^{-\lambda\phi}$, where $V_{0} = 0.7$, $\lambda = 0.1$ and $V'(\phi) = \dfrac{...
user avatar
2 votes
1 answer
98 views

From Runge-Kutta Butcher tableau to general linear methods matrices?

I am trying to understand how the relationship between Butcher tables for Runge-Kutta methods and their generalization to general linear methods matrices (by Butcher also). Runge-Kutta methods can be ...
Vincent's user avatar
  • 343
0 votes
0 answers
52 views

Prof A. Stanoyevitch's finite difference based PDE matlab code

Where can one find Prof A. Stanoyevitch's finite difference based PDE matlab code? They have a book on such a topic but can't find the accompanying code. Is it well received? It's not commonly talked ...
feynman's user avatar
  • 277
0 votes
0 answers
67 views

Best transform of matrix to make it efficient for shift-then-invert?

I am using ARPACK to find the smallest eigenvalue of a matrix. I use the shift and invert method. That is, looking for the largest eigenvalue of $$ (A-\sigma I)^{-1}. $$ However, I do not know $\sigma$...
Ma Joad's user avatar
  • 161
1 vote
0 answers
71 views

Stability of 4-bit matrix multiplication

To use newer accelerators like this, I need to perform matmul in 4-bit precision. How do I tell whether this operation is stable? Wondering if there well common heuristics in terms of properties of ...
Yaroslav Bulatov's user avatar
4 votes
0 answers
189 views

Why for $A^T A$, it is faster to computer the eigenvalues of its inverse than itself?

I have written the following code in MATLAB. I also observe the same effect in Arnoldi iteration in ARPACK in C. ...
Ma Joad's user avatar
  • 161
1 vote
0 answers
71 views

Ways to speed up Lanczos algorithm when we have a very dense cluster of many eigenvalues?

Lanczos algorithm can be used to find the largest/smallest eigenvalues of matrices. I am trying to find a good library in C/C++/Rust for finding the smallest singular value (or eigenvalue). I have ...
Ma Joad's user avatar
  • 161
0 votes
1 answer
89 views

Prof Lawrence Shampine's hpde matlab code

Where can one find Prof Lawrence Shampine's hpde matlab code? Is it well received? It's not commonly talked about.
feynman's user avatar
  • 277
20 votes
9 answers
4k views

C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

I am completely stunned how numerical errors can diverge for so innocent programs. In Python 3.11.7 the program ...
Smilia's user avatar
  • 468
3 votes
1 answer
273 views

How to evaluate the points near/at the boundary when using Richardson extrapolation for improved accuracy of a derivative

If we want to improve the accuracy of our numerical estimation of a derivative, we can use Richardson extrapolation. The method is very beneficial when using a centered difference scheme and the ...
FriendlyNeighborhoodEngineer's user avatar
2 votes
2 answers
108 views

Gradient descent for solving polynomial equations while encouraging variables to be nonzero

I would like to use gradient descent to "randomly sample" solutions to a set of homogeneous polynomial equations. Because the equations are homogeneous, setting all variables to 0 is a valid ...
PPenguin's user avatar
  • 123
1 vote
1 answer
89 views

How can you calculate catastrophic cancellation error?

I'm trying to follow the wikipedia page about catastrophic cancellation but I've hit something that just doesn't make sense to me. They say that subtraction can amplify existing approximation errors (...
profPlum's user avatar
  • 149
0 votes
1 answer
69 views

Why using large bound to supplement inifinity in interior point method can be bad

Here in the documentation of mosek (https://docs.mosek.com/latest/pythonfusion/debugging-numerical.html) we see: Never use a very large number as replacement for infinity . Instead define the ...
Matt Frank's user avatar
0 votes
0 answers
43 views

2nd-order backward difference approximation for temporal terms of Euler–Bernoulli beam

I am trying to solve the Euler–Bernoulli beam numerically in structural dynamics analysis: $$\frac{\partial^2w(x,t)}{\partial t^2}= \frac {q(x,t)}{\mu(x)}-\frac {1}{\mu(x)}\frac {\partial^2}{\partial ...
Chaozhi Qiu's user avatar
1 vote
1 answer
115 views

Best finite difference scheme in 2D for the mixed derivative

The are good methods to deduce finite difference schemes for derivatives of functions of one variable. But how to get a good one for the mixed derivative of a function of two variables $u=u(x,y)$, ...
Bogdan's user avatar
  • 113
0 votes
0 answers
36 views

Numerical Divergence of a Tensor Field in Spherical Coordinates

I want to calculate the divergence of a rank-2 tensor field $$\nabla \cdot T$$ defined on the surface of a sphere in spherical coordinates. As an example, let the field be given as follows : ...
haricash's user avatar
0 votes
1 answer
84 views

shooting method to compute the interface shape

I am trying to use a shooting method to compute the shape of liquid-gas interface given by the following differential equation: $$ \frac{d^2 \theta}{ds^2} = \frac{f(\theta)}{h(h + 3\lambda)} $$ with $\...
Sthavishtha Bhopalam's user avatar
-1 votes
1 answer
105 views

What is the name of the theory that combines 3d discretized surfaces and distributed numerical algebra

I've looked into distributed numerical computation work before, but I've realized that 3D applications are all about 3d surfaces and meshes.So I'd like to look into related work on mesh and parallel ...
Haitao Xiao's user avatar
0 votes
0 answers
34 views

Order of Error - Confusion: Clarifying Constraints on Constants and Determining Order of Error

I'm struggling to determine the order of error when considering the error value denoted by $\text{err}$ in relation to the variable $h$. Specifically, I aim to ascertain the value of $x$ in the ...
Ferran Gonzalez's user avatar
1 vote
0 answers
55 views

Finite volume method for a general flux

How to approximate flux 𝐹(𝑢)⋅𝑛 where 𝑛 denotes the unit normal outward when using finite volumes? in my case it's not a conservation law so my question is how can we approximate the final term \...
Chems Eddine's user avatar
2 votes
0 answers
57 views

Why the following discrete inequality are equal?

When reviewing papers on the numerical solutions of Partial Differential Equations (PDEs), I observed the following equation: $$ (1-C\tau)||\theta^n||^2 \leq ||\theta^{n-1}||^2 + C\tau (h^{2r+2}), $$ ...
Owen Jun's user avatar
  • 141
13 votes
8 answers
3k views

Real-world applications of eigendecomposition?

Cross-posted on Math.SE Are there real-world applications that call specifically for eigenvalues rather than singular values? I often see eigendecomposition used as "poor-man's SVD" For ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
161 views

How to approximate the flux when using finite volumes?

How to approximate flux $F(u)\cdot n$ where $n$ denotes the unit normal outward when using finite volumes? $$\int_{\sigma} F(u) \cdot \boldsymbol{n}_{K, \sigma} \mathrm{d} \gamma(x)$$
Chems Eddine's user avatar
0 votes
0 answers
37 views

Convergence of Modified Crank-Nicolson Scheme

I'm dealing with a particular reaction-diffusion equation having the form $$ c_t = \alpha \nabla^2 c + F(c,x,t). \tag{1}$$ where $F$ is nonlinear. I would like to solve (1) with a finite-difference ...
zaccandels's user avatar
0 votes
0 answers
97 views

Solving a steady-state PDE

I'm working on trying to solve a steady state PDE in python and I am quite new to python and I am slightly confused on the implementation details. I have an example implementation of solving a non-...
blov's user avatar
  • 43
4 votes
1 answer
136 views

Burger's equation (PDE) does not work with downwind difference?

I'm working on implementing the discretised Burger's equation. I am quite confused as to why it does not work when using a step-function and downwind difference formula. When using a step-function and ...
blov's user avatar
  • 43
0 votes
1 answer
63 views

How to use a custom OdeSolver in Scipy's solve_ivp

In Scipy's solve_ivp documentation, we see the method argument can be either a string or a user-defined ...
Axel Wang's user avatar
  • 197
3 votes
1 answer
273 views

Finite difference problem

I have a problem to resolve with the Finite Difference method in $[a,b]$: $$-\frac{d}{dx}(\alpha(x)\frac{du}{dx})= g(x),$$ with $\alpha(x) \in L^{\infty}$ continuous in $]a,c[$ and $]c,b[$ and ...
Kaneki Ken's user avatar
2 votes
0 answers
78 views

Numerical integration in Fourier space over 3D grid

I am attempting to implement a model outlined in this paper: General magnetostatic shape–shape interactions Background This model allows the calculation of magnetostatic interaction energies between ...
JasonC's user avatar
  • 33
0 votes
1 answer
60 views

Local truncation error of given implicit 1-step scheme

I'm given the 1-step implicit scheme $$y_{n+1} = y_n + \frac{h}{6}[4f(t_n, y_n) + 2f(t_{n+1}, y_{n+1}) + hf'(t_n, y_n)],$$ where $y'(t) = f(t, y)$, and I'm seeking the scheme's local truncation error. ...
jackyooo's user avatar
1 vote
1 answer
89 views

enough conditions to check that a matrix doesn't have Cholesky factorization while factorizing it

I wrote this code to find Cholesky factorization of a symmetric positive definite matrix in MatLab: ...
Ferran Gonzalez's user avatar
1 vote
1 answer
77 views

Does anyone know how to add a forcing term at the center of a cicular membrane?

I am here once again searching for wisdom, as some of you might notice I asked a related question a few days ago. And now I am struggling to add a forcing term at the center of the membrane, in order ...
Manuel Borra's user avatar
2 votes
0 answers
67 views

Efficient Algorithm for LU-Factorization of Modified Matrix with Last Column Alteration If We Have Its Not-Modified LU-Factorization

Suppose that we have a $n\times n$ matrix $A$. We have its LU-factorization as $A=LU$ (or $PA=LU$ that $P$ is a permutation matrix). Now assume we change the last column of matrix $A$ and denote the ...
Ferran Gonzalez's user avatar
3 votes
0 answers
193 views

Most promising reduced order modeling method

Many players in the field of engineering simulation software are investing on digital twinning and reduced order modeling techniques, meaning that the field bears potential. I was wondering if among ...
Lilla's user avatar
  • 259
0 votes
0 answers
76 views

Why have consumer-level graphing calculators seemingly not developed in 20+ years?

Apologies if this is the wrong forum to post this question in - I truly don't know where else I would (if you do, please let me know!). But essentially, I am not a mathematician, though I was reading ...
PropertyBrother's user avatar
9 votes
3 answers
3k views

More stable algorithm to calculate `sqrt(a^2 + b^2) - abs(a)` in MatLab

Suppose we want to calculate $\sqrt{a^2+b^2}-|a|$ in MatLab. Using sqrt(a^2 + b^2) - abs(a) will have some problems: If a or <...
Ferran Gonzalez's user avatar
0 votes
1 answer
173 views

Solving the wave equation for a circular membrane in polar cordinates

As you see this mode is not right, unless for what i understand And the initial conditions were ...
Manuel Borra's user avatar
0 votes
1 answer
201 views

Problems on the algebraic theory of sparse matrices

I have finished testing basic large densely parallel matrix multiplication on 4 gpu's ,and have done work on TSLU and TSQR on cpu's based on mpi. I am going to continue working on the theory of ...
Haitao Xiao's user avatar
5 votes
0 answers
87 views

optimization scaling techniques

Consider a convex QP of the form $$ \min_x \bigl\{\tfrac12 x^\top Q x + q^\top x : Ax\leq b\bigr\}\tag{P} $$ with dual $$ \min_y \bigl\{\tfrac12 (A^\top y + q)^\top Q^{\dagger} (A^\top y+q) + b^\top y ...
jjjjjj's user avatar
  • 325
0 votes
0 answers
211 views

Right blocked linear equation solver on Dense Algebra and Sparse Algebra

I have implemented 1D mesh parallel QR decomposition and LU decomposition,I would like to ask if a linear equation Ax=b,b is a large matrix and I need to shard b or Shard A,b at the same time. Is ...
Haitao Xiao's user avatar
0 votes
0 answers
39 views

What is the minimum error achievable using gaussian process emulation?

I am interested in using Gaussian processes as emulators for other computational models, and I would like to characterize the expected numerical precision of the emulator. Specifically, how small can $...
user9794's user avatar
  • 465
0 votes
1 answer
99 views

row and column based distributed LU factorization

The LU parallel computation theories I've seen are based on $M\times N$ mesh computations, is there a theory for one dimensional device mesh LU parallel decomposition? For example, $A$ is a matrix. we ...
Haitao Xiao's user avatar
3 votes
1 answer
150 views

Role of rotation's pivot point in optimization?

In this paper, the authors describe how to use locally rigid transformations (sampled on nodes in space) to deform mesh vertices. In the paper, rotations are relative to the pivot point, which ...
jordi's user avatar
  • 31

1
2 3 4 5
13