13 #include <athena/athena.hpp>
14 #include <athena/mesh/mesh.hpp>
15 #include <athena/outputs/user_outputs.hpp>
28 FITSOutput::FITSOutput(OutputParameters oparams) : OutputType(oparams) {}
30 void FITSOutput::WriteOutputFile(Mesh *pm, ParameterInput *pin,
bool flag) {
34 if (output_params.file_number > 0) {
35 std::string fname =
"!";
38 snprintf(number,
sizeof(number),
"%05d", output_params.file_number);
40 fname.append(output_params.file_basename);
42 fname.append(output_params.file_id);
45 fname.append(
".fits");
47 for (
int i = 0; i < pm->nblocal; ++i) {
48 MeshBlock *pmb = pm->my_blocks(i);
49 auto &pfit = pmb->pimpl->all_fits.back();
50 pfit->MakeMCMCOutputs(fname);
56 output_params.file_number++;
57 output_params.next_time += output_params.dt;
58 pin->SetInteger(output_params.block_name,
"file_number",
59 output_params.file_number);
60 pin->SetReal(output_params.block_name,
"next_time", output_params.next_time);