I wanna implement particles refinement in dualsphysics. and it is already done (only refinement without derefinement). Details show in picture.
red particles means the daughter particles.And they should be excluded once they leave the refinement zone.But obviously, it didn't happen.
So the problem is the derefinement process do not work.
Here is the changes in code for definement process:
1.Type.h Declare a new particles code 0xc000 for merge.
2.JSphCpu.cpp-------UpdataPos. if the daughter particles leave the refinement zone set the code Outmerge.
3.JSph.app-------AddParticles. for countting particles which have the code Outmerge.
Maybe some thing i missed. I read the code JCellDivCpuSingle.cpp------PreSort. where set the cellpart[code_outxxx particles]=BoxFluidOut. So, i think it should be worked. But it didn't.
Thanks for any response.