Skip to content

BUG: DMD: snapshot0 becomes lost due to purgeWrite

Summary

IOField<scalar> snapshot0 is the so-called first snapshot required by mode-sorting algorithms of DMD at the end of a process. We have been storing the set of associated data in the first execution time of a given DMD FO - to avoid keeping it in the memory all along a simulation - but this data is discarded whenever purgeWrite is activated.

Steps to reproduce

Enable purgeWrite 1; in $FOAM_TUTORIALS/incompressible/pimpleFoam/laminar/cylinder2D, and ./Allrun.

Environment information

    api      = 2103
    patch    = 210414
    HEAD     = 02f255b3d6
    version  = com
    compiler = Clang (system)
             = clang version 9.0.1 
    mpi      = SYSTEMOPENMPI
             = mpirun (Open MPI) 1.10.7.0.5e373bf1fd
    OS       = Description:     openSUSE Leap 15.1
    opts     = linux64ClangDPInt32Opt

Possible fixes

Changing the IO address of IOField<scalar> snapshot0 to something which cannot be overwritten by purgeWrite, may be to 0.