I often solve pdes for my research, and years ago I found `pdetoode` in this forum is very handy and solve severy chanlenging pdes ([here][1], [here][2] and [here][3] for example) in this forum. Thus, I decied to figure its working principle.

I have been studying hard on the package `pdetoode` by xzczd for many times and many days each time.

I still can't figure out the how the pde converted to odes.

In particularlly, the following command:

```
((u : func) | Derivative[dx1 : pat, dt_, dx2___][(u : func)])[
  x1 : pat, t_, x2___] :>
 (Sow@coordtoindex@{x1, x2};
  fdd[{dx1, dx2}, {grid}, Outer[Derivative[dt][u@##]@t &, grid], 
   "DifferenceOrder" -> o, PeriodicInterpolation -> periodic])
```

I guess from the context that `pat` here means whatever repeats itself several times exactly. However, for code [here][4], after I print `dx1`, and `x1`. In some cases `dx1 = 01`, `x1=xy` , **this confues me a lot**. 

**How can this be? Maybe I misunderstand something here?
What does this piece of code try to do?**

I tried my best but I still fails to understand it.

Can anyone explain something on the above code or `pdetoode`? Thanks!


  [1]: https://mathematica.stackexchange.com/questions/127980/dynamic-euler-bernoulli-beam-equation/127997#127997
  [2]: https://mathematica.stackexchange.com/questions/230429/nonlinear-dispersal-equation-modeling-insect-aggregation/230431#230431
  [3]: https://mathematica.stackexchange.com/questions/184281/why-does-ndsolve-fail-to-solve-the-pdes-and-spit-out-mconly-warning/184285#184285
  [4]: https://mathematica.stackexchange.com/questions/160012/solving-systems-of-partial-differential-equations-with-functions-of-different-nu/160105#160105