Possible memory leak in setFields with surfaceToCell
Summary
When running setField with surfaceToCell I believe there is a memory leak. With the provided case the .obj file size is around 226 MB and setFields uses 31 GB of RAM at it's peak. Furthermore, I have tried with the file that is 770 MB and with that one RAM usage is around 215 GB at it's peak. I couldn't use the larger file as it was crashing due to not enough RAM memory.
Steps to reproduce
Run attached case and observe memory usage when setFields command is executed
Example case
As the case is 46 MB because of the bit larger .obj file I cannot attach it here so here is the link.
https://drive.google.com/file/d/1B4XMstiTWINkHkeTwDrl4PeJNg_wH-FC/view?usp=sharing
What is the current bug behaviour?
It uses too much RAM memory.
What is the expected correct behaviour?
To use way less RAM memory
Environment information
- OpenFOAM version : v2012
- Operating system : ubuntu/docker
- Hardware info : AMD EPYC 7401P 24-Core Processor with 256 GB of RAM
- Compiler : gcc
Edited by Nikola Majksner