std::string base_name;
double t_final;
double output_granularity;
- bool enable_compute_error;
+
+ bool asynchronous_writeback;
bool resume;
output_granularity,
"time interval for output");
+ asynchronous_writeback = true;
+ add_parameter("asynchronous writeback",
+ asynchronous_writeback,
+ "Write out solution in a background thread performing IO");
+
resume = false;
add_parameter("resume", resume, "Resume an interrupted computation.");
}
// time stepping in the main loop - the thread will run in the
// background.
- output_thread = std::move(std::thread(output_worker));
+ if (!asynchronous_writeback)
+ {
+ output_thread = std::move(std::thread(output_worker));
+ }
+ else
+ {
+ output_worker();
+ }
}
} // namespace Step69
# Listing of Parameters
# ---------------------
subsection A - MainLoop
+ # Write out solution in a background thread performing IO
+ set asynchronous writeback = true
+
# Base name for all output files
- set basename = test
+ set basename = test
# Final time
- set final time = 4
+ set final time = 4
# time interval for output
- set output granularity = 0.02
+ set output granularity = 0.02
# Resume an interrupted computation.
- set resume = false
+ set resume = false
end