Skip to main content
13 votes
Accepted

What does optimal convergence rate mean? How to prove whether a numerical method, e.g. FEM, has an optimal convergence rate or not?

The term is commonly used in the following way in the finite element context: Let's assume that $u\in V$ is the exact solution of the PDE, and $u_h\in V_h$ the finite element approximation. Then we ...
Wolfgang Bangerth's user avatar
11 votes

What is “tolerance” in ODE45 in Matlab?

And, it is my understanding that the 4 and the 5 are for the order of the global and local error, respectively. Your understanding is wrong. The local error of a Runge–Kutta method of order $n$ is ...
Wrzlprmft's user avatar
  • 2,022
10 votes
Accepted

Accuracy loss in single-precision Euclidean norm computation

The squares are harmless (as long as they don't overflow/underflow), because the relative perturbation they introduce is of the order of the machine precision $u\approx 10^{-8}$. Your troubles here ...
Federico Poloni's user avatar
9 votes
Accepted

How can I derive the a priori error estimate for a symmetric bilinear form using lagrange finite elements?

To extend VorKir's basically correct answer, to derive a priori error estimate for finite element approximations, you need to stack the following three Lego blocks: The well-posedness of the weak ...
Christian Clason's user avatar
7 votes
Accepted

Understanding the diffusion error of numerical schemes

Just figured it out. The solution diffuses BY A FACTOR OF $|G|^n$ after n time steps. So in my example, for the low frequency case, if let's say the original signal was a square wave advecting to the ...
F_B's user avatar
  • 111
6 votes

How to avoid the round-off errors in the larger calculations?

Below are some tips to reduce the effect of round off errors. A short method is to increment the floating point precision, for example from float to double, but many times this is too expensive or not ...
6 votes
Accepted

Error on a integral quantity with noise

Assuming that you mean the following inequality in your prompt $$ |F_\mathrm{true}(x) - F(x)| \le |dF(x)| \qquad \forall x,$$ a simple bound for $dM$ is the following $$ dM \equiv | M_\mathrm{true} - ...
Richard Zhang's user avatar
6 votes
Accepted

Different sources of error in Finite Element computations

The triangle inequality is your friend. Let's ignore the issue of boundary approximation for a moment, then you are computing a solution with inexact linear solver. Let's call it $u_h$. We will call ...
Wolfgang Bangerth's user avatar
6 votes
Accepted

How does non-dimensionalization improve the behavior of ODE solvers?

Background Let’s have a brief look at what parameters an integrator typically has and what they are used for. All of them govern step-size adaption: Relative tolerance (...
Wrzlprmft's user avatar
  • 2,022
5 votes

Error propagation through an FFT

Assembled from comments of @AlexE: The Fourier transform is linear, so the error in the Fourier domain is the Fourier transform of the error in the spatial (original) domain. So, if $\sigma$ is ...
5 votes

discrete definitions of curl $\nabla \times F$?

Continuous It looks like you only need 2d curl, so let's start with a simpler continuous definition: $$ \omega = \nabla \times \mathbf{u} = \frac{\delta v}{\delta x} - \frac{\delta u}{\delta y} $$ ...
hyperpallium's user avatar
5 votes
Accepted

Taylor expansion of error - Finite elements approximation

The question you ask is simpler than you may think. For any mesh size $h$, you can compute $\lambda(h)$. If this dependence is continuous, then you can do a Taylor expansion of $\lambda(h)$ around $h=...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Step size updating scheme adaptive embedded RK methods

First of all I don't see how this estimates the local error defined as the error we make in a single step using correct previous values. What does a lower order method have anything to do with ...
Chris Rackauckas's user avatar
5 votes
Accepted

How to compute the $L^{2}$ error of the gradient in the Finite Element Method

Like any other integral, you evaluate the error integral through quadrature. Your suggestion at the end of the question is exactly what you would do: The norm of the gradient error square is a sum of ...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Initial condition precision

In general, the initial error will already grow exponentially even if you solved the ODE exactly. The Lyapunov exponent (related to the Lipschitz condition) will tell you have fast. Separately, though,...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Error in Simpson's 3/8 rule is higher than that of Simpson's 1/3 rule

The simple segment-$[a,b]$-with-midpoints error formulas are for the 1/3 rule $$ E=-\frac{(b-a)^5}{90·2^5}f^{(4)}(\zeta) $$ and for the 3/8 rule $$ E=-\frac{(b-a)^5}{90·72}f^{(4)}(\zeta) $$ Now the ...
Lutz Lehmann's user avatar
  • 6,109
5 votes
Accepted

The error propagation in calculating the inverse using a matrix decomposition

Irrespective of how you compute an approximate inverse $K\approx M^{-1}$, there is a limit to the (normwise) accuracy up to which $KM \approx I$ can hold: just because of the fact that $K$ and $M$ are ...
Federico Poloni's user avatar
4 votes
Accepted

$L^2$-error in FEM: how to compute integral over reference element?

You can write $$\int_{0}^1 (f - \Pi_h^1(f))^2 dx = \sum_{i=0}^{N_e} \int_{e} (f - \Pi_h^1(f))^2 dx$$ where $e = [x_k, x_{k+1}]$ is an interval (triangle as you say). Method A (simple, no reference ...
Dr_Sam's user avatar
  • 1,246
4 votes
Accepted

Error measure for a simple finite difference scheme

The error measure you have is not appropriate. That's because if you compute the quantities $df_i = \frac{f_{i+1}-f_i}{x_{i+1}-x_i}$, then they essentially approximate the error at location $\frac{x_{...
Wolfgang Bangerth's user avatar
4 votes
Accepted

error estimator VS error indicator in the context of FEM error estimation

In general, for a finite element approximation $u_h$ of the exact (but unknown) solution $u$ of a partial differential equation, it would of course be nice if we could compute something like $\|u-u_h\|...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Log-transformation of decision variables in parameter estimation

Transformations are usually a good idea if they are done to impose domain constraints. Using the exponential of a parameter (so storing the log, which I think is what you mean here) is a good way to ...
Chris Rackauckas's user avatar
4 votes
Accepted

Asymptotic error of forward Euler

When we say that Euler method is first order accurate, it means that for a class of ode with sufficiently smooth solutions, the error will be at most $O(h)$ and there is at least one ode for which it ...
cfdlab's user avatar
  • 3,028
4 votes
Accepted

Taylor expansion round-off error

Let $g(x)=\frac{f(x+h)-f(x)}{h}$, and let $\bar{g}(x)$ its floating point representation with machine precision denoted by $\mu$. Recall that $\text{fl}(f(x)) = f(x)(1+\delta)$ with $|\delta| \leq \mu$...
VoB's user avatar
  • 560
4 votes

A priori estimates in finite elements for inhomogeneous heat equation

Take a look at the papers by Vidar Thomee. Maybe Jim Bramble also has something. This would have been done in the 1970s and 1980s, maybe going into the 1990s. You will probably find that the points ...
Wolfgang Bangerth's user avatar
4 votes
Accepted

How to refine $h$ and $\Delta t$ for convergence tests on evolution PDE

Here are a few solutions that you could explore to determine the orders in space and time. 1) Separate study of time error You can use a given spatial mesh, and perform multiple simulations with finer ...
Laurent90's user avatar
  • 1,943
3 votes
Accepted

FEM problem: how to get a feeling for size of problem

If $f_T$ is the piecewise constant cellwise mean, then indeed $\|f-f_T\|_{L_2} \propto {\cal O}(h)$. Consequently, the term $$ \sum_K h_K^2 \|f-f_T\|^2_{L_2(K)} \le h^2 \|f-f_T\|_{L_2}^2 \le C h^4,...
Wolfgang Bangerth's user avatar
3 votes
Accepted

Relationship between global and local error?

This is not a formal proof, but intuitively you're making a truncation error at each time step of $O(\Delta t^k)$. Your global error will be the error at the time horizon $T = N\Delta t$. This means ...
Lukas Bystricky's user avatar
3 votes

How can I derive the a priori error estimate for a symmetric bilinear form using lagrange finite elements?

I am not pretending to give the best point of view, but I think of the following general lines. To obtain the error estimates in classical cases, you use as ingredients: interpolation error (which ...
VorKir's user avatar
  • 254
3 votes
Accepted

How can I compute the difference between shape function and dual solution in dwr?

You seem to be confused about what is a vector and what is a scalar. $z_h$ and $\phi_i$ are both scalars if evaluates at quadrature points. The fact that the $z_i$ form a vector really has no ...
Wolfgang Bangerth's user avatar
3 votes

Discretization Error amplification instead of stagnation to machine precision

Yes. This behavior is to be expected and normal. When you are computing with a small value for $\mathrm dx$ then, to compute the difference quotient, you are subtracting two numbers that are nearly ...
H. Rittich's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible