Skip to content

Commit 2efed9c

Browse files
authored
Adding SG potential to idfx files (#285)
* Added SG Pot to idfx files * consistent var names
1 parent 8d13e69 commit 2efed9c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/dataBlock/dumpToFile.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ void DataBlock::DumpToFile(std::string filebase) {
9292

9393
WriteVariable(fileHdl, 4, dims, fieldName, locVc.data());
9494

95+
if (this->gravity->haveSelfGravityPotential) {
96+
IdefixArray3D<real>::HostMirror locPot = Kokkos::create_mirror_view(this->gravity->phiP);
97+
Kokkos::deep_copy(locPot, this->gravity->phiP);
98+
99+
dims[3] = 1;
100+
std::snprintf(fieldName,NAMESIZE,"Pot");
101+
102+
WriteVariable(fileHdl, 4, dims, fieldName, locPot.data());
103+
}
104+
95105
// Write Flux
96106
/*
97107
nx1=this->np_tot[IDIR];

0 commit comments

Comments
 (0)