### Numerical analysis 2

Posted on 18/09/2018, in Mathematics.
settings_backup_restore

## Some definitions

### Machine epsilon

Đang tìm cái liên quan đến condition number cũng như bao nhiêu condition number thì hợp lý. Có thể xem bài viết về condition number và 1 chút về machine epsilon trên Math2IT tại đây.

Machine epsilon eps trong matlab xấp xỉ $2\times 10^{-16}$. It roughly means that numbers are stored with about 15-16 digits of precision. If a number is approximately 1, then that means it can be stored with an error of around 10^(-16) or so. If the number is approximately 1000, then it is stored with an error around 10^(-13) or so.

Tự hiểu: cái machine epsilon này có nghĩa là khi tính toán trên các con số thì bản thân cái máy đó (ví dụ matlab) nó sẽ dùng các phương pháp xấp xỉ, làm tròn,… ra được 1 kết quả, kết quả này sẽ sai lệch so với kết quả lý thuyết 1 con số eps với số chữ số là $16$ ví dụ như trong matlab.

## Basis function

### Basis function của Crouzeix-Raviart

Xem tại đây (trang 26), 3 nodes nằm ở trung điểm của các cạnh tam giác. Khi ấy $\varphi_i(x_j)=\delta_{ij}$ trong đó $x_i$ là trung điểm 3 cạnh.

Cái basis này được nhắc đến trong bài báo của El-Otmany Capatina2017.

## Interface vs Boundary

I’m not particularly familiar with biofilm literature. But in most computational literature, the border of the entire domain of a problem are usually referred to as the boundary. Outside of a boundary, there are no nodes, elements, or anything else under consideration.

The entire domain may also be subdivided into smaller regions. Some of these regions share edges on the boundary of the domain. However, some of these regions share borders between each other that are not boundaries of the domain. Usually these regions have different material properties or different relevant physics and may also have different meshes. The borders between any two regions in a domain are usually referred to as interfaces.

—comment—-

In multiphase flow, the boundary between phases is usually referred to as an “interface” to distinguish it from the actual physical boundaries surrounding the system.

In some literatures, I found that the authors use the term “interfaces” to indicate the geometry position/properties between 2 fluids/phases/something else… However, when they need to use a boundary condition on these interfaces, they call them boundary in term “boundary condition” (not “interface condition”). So, generally, 2 terms are only different about their meaning, is that right?

## Matrix

In FEM, stiffness matrix represents the system of linear equations that must be solved. $AU=F$.

Stiffness matrix is symmetric, i.e., all its eigenvalues are real! Thứ tự trước sau của $i,j$ là khác nhau, cái này có được “nói” ở cuối bài này của wiki.

Mass vs stiffness matrix có thể xem ở hai file mass vs stiffness matrix (suji).pdfmass vs stiffness matrix (sayas).pdf.

• Stiffness matrix: $W_{ij}= \int_{\Omega} \nabla \varphi_j \cdot \nabla \varphi_i dx$
• Mass matrix: $M_{ij} = \int_{\Omega} \varphi_j\varphi_i dx$

Both matrices are symmetric. The mass matrix M is positive deﬁnite. The stiﬀness matrix is positive semideﬁnite and in fact almost positive deﬁnite: if we eliminate take any index i and erase the i−th row and the i−th column of W, the resulting matrix is positive deﬁnite.

The original equation is the Poisson equation $−\Delta u = f$ and no reaction term appears, only the stiﬀness matrix appears. Therefore, stiﬀness comes from diﬀusion, mass proceeds from reaction.

In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero.

A matrix, or other problem, is “badly scaled” when some numbers in the problem are so much larger than the other that they cannot be kept in memory to the same accuracy, causing some information to be lost.

## Lagrangian Finite Elements (Pk)

Cùng tìm hiểu $P^k$ finite element là gì? Cái này xem trong mục 6.3 của freefem++doc. Có thể hiểu sơ sơ, $P^k$ là tập hợp những đa thức bậc cao nhất là $k$.

Có thể đọc thêm ở chương 3 file aide-memoire element finis - alex ern BOOK.pdf.

## The Forward/Bakward Euler scheme

Xem thêm ở file mass vs stiffness matrix (suji).pdf.

• The forward Euler scheme: $\dfrac{\partial u}{\partial t} \simeq \dfrac{u^{m+1}-u^m}{\Delta t}$, tất cả các cái $u$ khác đều là $u^m$. Cho trước $u^m$, tìm $u^{m+1}$.
• The backward Euler scheme: $\dfrac{\partial u}{\partial t} \simeq \dfrac{u^{m+1}-u^m}{\Delta t}$, tất cả các cái $u$ khác đều là $u^{m+1}$.

## Stabilization vs Preconditioning

Tham khảo: stability vs conditioning MIT.pdfstability vs conditioning.pdf

The terms stability and conditioning are used with a variety of meanings in Numerical Analysis. They have in common the general concept of the response of a set of computations to perturbations arising from

• the data
• the specific arithmetic used on computers.

They are not synonymous!! A numerical algorithm is not only perturbed by the errors in the data, but also with respect to the errors arising in the process of computations.

The most fundamental is the distinction between instability in the underlying mathematical problem and instability in an algorithm for the (exact or approximate) treatment of the problem.

• face Đọc thêm

Về định nghĩa và thế nào là preconditioning, có thể xem ở note này.

Còn định nghĩa về stability, có thể xem ở

• Wikipedia:
• the growth of round-off errors and/or initially small fluctuations in initial data which might cause a large deviation of final answer from the exact solution
• robust – that is to say, do not produce a wildly different result for very small change in the input data.
• convergence đòi hỏi phải có stability.
• methods are stable, in the sense that small changes or perturbations in the initial conditions produce correspondingly small changes in the subsequent approximations. numerical douglas Book (p.340)
• Cũng trong sách của Douglas, có thể xem về preconditioning ở trang 486.
• stability is a property of the discrete problems and depends on the particular choice of norms, but it does not depend on the true solution $u$ in any way. [numerical lecture note - arnold] p.11

Lehrenfeld có nhận xét là ví dụ trong Hansbo với Hansbo-averaging thì không gặp vấn đề với stability nhưng vẫn có vấn đề với matrix ill conditioned. Điều này suy ra stabilisation và preconditioning là hai cái khác nhau rất nhiều, ảnh hưởng nhiều đến vấn đề đang gặp. Phải làm riêng!!!!

## Courant–Friedrichs–Lewy condition (CFL)

$$\dfrac{u \times \Delta t}{\Delta x} \le C$$
• If method is explicit, then $C=1$
• If method is implicit, Implicit (matrix) solvers are usually less sensitive to numerical instability and so larger values of $C$ may be tolerated.