During the EGU2023 conference, when I presented a high-performance MPM (Material Point Method) solver, I was asked, "How do you discretize the computational model for the MPM?" I didn't have a clear answer (I didn't even consider it a problem) because the models were relatively simple and could be generated directly using some straightforward functions. However, as computational models gradually became more complex and diverse, I began to realize that this was indeed a very good question. The preprocessing for MPM should not be a computationally intensive task; it should be fast enough. Yet, I couldn't find a "plug-and-play" generalized code for this purpose. Some literatures have contributed to this issue, and I built upon their work to create a comprehensive and refined julia package.
No parallelization, no problem—5,334,808 particles from an STL file (998,137 triangles) in just 0.6 s.
Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Just type ] in Julia's  REPL:
julia> ]
(@1.11) Pkg> add MaterialPointGenerator- Structured (regular) coordinates
 - Support complicated 2/3D models
 - Particle generation from a Digital Elevation Model (DEM) file
 - Automatically interpolate DEM files with support for shape trimming
 - Attach attributions to the particles
 - SLBL and boundary selector interface
 
| 3D phoenix and dragon | DEM with thickness | complex 2D | 
|---|---|---|
![]()  | 
![]()  | 
![]()  | 
2D landslide profile with geological structure (nid) | 
|---|
![]()  | 
| 3D DEM with material ID | Profile | 
|---|---|
![]()  | 
![]()  | 
| SLBL | 
|---|
![]()  | 
If you find MaterialPointGenerator.jl useful or have used it in your research, please cite it as follows:
@article{Huo2025,
  author  = {Huo, Zenan
             and Zheng, Xiangcou
             and Jaboyedoff, Michel
             and Podladchikov, Yury
             and Mei, Gang
             and Tang, Xiong},
  title   = {An efficient framework for structured material particle generation in multi-context modeling},
  journal = {Engineering with Computers},
  year    = {2025},
  month   = {Oct},
  day     = {17},
  issn    = {1435-5663},
  doi     = {10.1007/s00366-025-02222-z},
  url     = {https://doi.org/10.1007/s00366-025-02222-z}
}This project is sponserd by Risk Group | Université de Lausanne and China Scholarship Council [中国国家留学基金管理委员会].







