could be other reasons than in the code you showed, there is technically nothing wrong with it, although the for loops checking around the particle would not work as intended. the other possibility is that your element numbering is messed up, so spawning what you think is PRTN is not actually PT_PRTN