Hi @Tea , I could try to explain it briefly.

In the MLS-MPM paper, we know the **Quadratic kernels** is

\mathrm{N}(x)=\left\{\begin{array}{ll}
\frac{3}{4}-|x|^{2} & 0 \leqslant|x|<\frac{1}{2} \\
\frac{1}{2}\left(\frac{3}{2}-|x|\right)^{2} & \frac{1}{2} \leqslant|x|<\frac{3}{2} \\
0 & \frac{3}{2} \leqslant|x|
\end{array}\right..

It can be shown as

The quadratic kernel could be divided into three parts according to the definition domain.

- N(x) \in [0.5,1.5]
- N(x) \in [-0.5,0.5]
- N(x) \in [-1.5,-0.5]

These three parts could all be translated to the definition domain [0.5,1.5] .

- The first part didn’t need to translate, so N(x) \in [0.5,1.5] = f(x) \in [0.5, 1.5] . f(1.0) = N(1.0)

- The second part after translation is g(x) \in [0.5, 1.5] = N(x) \in [-0.5,0.5] , g(1.0) = N(0.0)

- The third part after translation is h(x) in [0.5, 1.5] = N(x) \in [-1.5,-0.5] , h(1.0) = N(-1.0)

In Line 36 of `mpm88.py`

:

```
w = [0.5 * (1.5 - fx)**2, 0.75 - (fx - 1)**2, 0.5 * (fx - 0.5)**2]
```

The three-components of `w`

correspond to the three parts of N(x).

Specifically,

`w[0] = 0.5 * (1.5 - fx)**2`

corrsponds to f(x).

`w[1] = 0.75 - (fx - 1)**2`

corrsponds to g(x).

`w[2] = 0.5 * (fx - 0.5)**2`

corrsponds to h(x).