Skip to content

Commit

Permalink
Adding SG potential to idfx files (#285)
Browse files Browse the repository at this point in the history
* Added SG Pot to idfx files

* consistent var names
  • Loading branch information
vdbma authored Oct 25, 2024
1 parent 8d13e69 commit 2efed9c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/dataBlock/dumpToFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ void DataBlock::DumpToFile(std::string filebase) {

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

if (this->gravity->haveSelfGravityPotential) {
IdefixArray3D<real>::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];
Expand Down

0 comments on commit 2efed9c

Please sign in to comment.