Closed AngusLaurenson closed 6 years ago
I think that the output files are overwritten in every iteration of the for loop. You can avoid this by defining a crop quantity only once, which you can then save in each iteration.
Something like:
crp := CropZ(m, 16, 17)
save(crp)
for n := 0; n <= 10; n++ {
run(1e-10)
save(crp)
}
Although this might save your problem, I would suggest a more robust approach in which you name the output files yourselves:
crp := CropZ(m, 16, 17)
saveas(crp,"crop_init.ovf")
for n :=0 ; n<10; n++ {
run(1e-12)
filename = sprintf("crop%.3d.ovf",n) // use the iteration index to number the files
saveas(crp, filename)
}
hello, I'am new in goland and mumax3. I want to know, for this above answer, how can we save this file by changing the name for in each iteration? like: saveas(crp, filename(n)). so that we can save can have names in output: filename0, filename1, filename2, ...., filename10
Thanks , waiting fir help.
Sliced output works when in the main body but not when in a loop. There is no error message and the simulation runs to completion. However the .ovf files expected to be saved during execution of the for loop are absent from the output folder.
The script
ls of .out folder