/** 'Bug' which causes scrambling of scalar list 'evolving' This was a mistake on my behalf not initialising evolving correctly so that it was only a local variable in defaults. The commented out line 15 was the incorrect initialisation. When correctly initialised using list_copy (which uses malloc() to globally allocate memory) this works properly. */ #define MAXLEVEL 2 scalar zb[], h[], eta[]; vector u[]; #include "predictor-corrector.h" scalar * evolving = NULL; int Nlist=3; event defaults (i = 0){ //evolving =(scalar *) {h, u}; evolving = list_copy({h, u}); foreach() for (scalar s in evolving) s[]=0.; boundary(evolving); for (int ii=0; ii