- 
                Notifications
    You must be signed in to change notification settings 
- Fork 121
Description
The levelset array stores an array that is the distance of any cell center to the outside of an immersed boundary. The levelset_norm array stores the direction from the cell center to outside of the cell array. We compute this for every point, meaning that there are 4 x m x n x p x num_ibs storage precision variables  being saved in memory. It is significantly more memory efficient to store these values for each ghost point instead, which will significantly improve our memory performance.
I propose adding a levelset and levelset _norm(1:3) variable to the ghost points, recalculating the levelset in the array that generates the ghost points, and deleting the levelset and levelset_nrom arrays from memory entirely. This will simplify every function in the compute_levelset module, reduce our memory footprint for every simulation that uses IBs, and simplify the optimization process for the MIBM method. At the same time, it will mean that we don't have to pass the levelset and levelset_norm arrays between the pre_process and simulation steps, since they will get generated at startup of simulation and only be updated if we have a MIBM perform a time step. Afterwards, we can move the m_compute_levelset.fpp file from common, which will be convenient for reducing the pre_process compile time slightly.