diff --git a/src/dataBlock/dumpToFile.cpp b/src/dataBlock/dumpToFile.cpp index 98b4a474..35b60b81 100644 --- a/src/dataBlock/dumpToFile.cpp +++ b/src/dataBlock/dumpToFile.cpp @@ -92,6 +92,16 @@ void DataBlock::DumpToFile(std::string filebase) { WriteVariable(fileHdl, 4, dims, fieldName, locVc.data()); + if (this->gravity->haveSelfGravityPotential) { + IdefixArray3D::HostMirror locPot = Kokkos::create_mirror_view(this->gravity->phiP); + Kokkos::deep_copy(locPot, this->gravity->phiP); + + dims[3] = 1; + std::snprintf(fieldName,NAMESIZE,"Pot"); + + WriteVariable(fileHdl, 4, dims, fieldName, locPot.data()); + } + // Write Flux /* nx1=this->np_tot[IDIR];