| 1179 | |
| 1180 | |
| 1181 | Long |
| 1182 | VisMF::WriteOnlyHeader (const FabArray<FArrayBox> & mf, |
| 1183 | const std::string & mf_name, |
| 1184 | VisMF::How how) |
| 1185 | { |
| 1186 | // BL_PROFILE("VisMF::WriteOnlyHeader(FabArray)"); |
| 1187 | BL_ASSERT(!mf_name.empty() && mf_name.back() != '/'); |
| 1188 | BL_ASSERT(currentVersion != VisMF::Header::Undefined_v1); |
| 1189 | |
| 1190 | |
| 1191 | Long bytesWritten(0); |
| 1192 | |
| 1193 | // Construct header for empty MultiFab |
| 1194 | bool calcMinMax(false); |
| 1195 | VisMF::Header hdr(mf, how, currentVersion, calcMinMax); |
| 1196 | |
| 1197 | // We are saving NO data => nComp = 0, nGrow = {0, 0, 0} |
| 1198 | hdr.m_ncomp = 0; |
| 1199 | hdr.m_ngrow = IntVect{AMREX_D_DECL(0, 0, 0)}; |
| 1200 | |
| 1201 | // FabOnDisk list is uninitialized => initialize it here |
| 1202 | for(VisMF::FabOnDisk & fod : hdr.m_fod){ |
| 1203 | fod.m_name = "Not Saved"; |
| 1204 | fod.m_head = -1; |
| 1205 | } |
| 1206 | |
| 1207 | // Write header on the IOProcessorNumber |
| 1208 | int coordinatorProc(ParallelDescriptor::IOProcessorNumber()); |
| 1209 | bytesWritten += VisMF::WriteHeader(mf_name, hdr, coordinatorProc); |
| 1210 | |
| 1211 | return bytesWritten; |
| 1212 | } |
| 1213 | |
| 1214 | |
| 1215 | void |
nothing calls this directly
no test coverage detected