refactoring of preCPFEM