I am creating a new kspace style, and I have to make a copy of the offset array density_brick in the pppm class. When I do this, I am running into errors, because in the init() function of the pppm class, it calls deallocate(), above which it says in comments “free all arrays previously allocated”. It seems that allocate() was not previously called, and I am running into seg faults because of that when I include the deallocation of my temporary density_brick. Do you know why this is happening? Thanks.
-Teddy Baker

You need to initialize all those arrays to NULL in the constructor.

Excellent, thank you, I appreciate it!