Write surface source only at the last batch, hard-code number of surfaces for surface_source.h5 sizing

This commit is contained in:
YoungHui Park 2020-04-13 02:55:05 -05:00
parent 109dfd20f5
commit c362ba5ef4
3 changed files with 5 additions and 4 deletions

View file

@ -380,7 +380,7 @@ void finalize_batch()
}
// Write out surface source if requested.
if (settings::surface_source) {
if (settings::surface_source && simulation::current_batch == settings::n_batches) {
auto filename = settings::path_output + "surface_source.h5";
write_surf_src_point(filename.c_str()); //!!
}