Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/sys/options.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,18 @@ void saveParallel(Options& opt, const std::string& name, const Field3D& tosave)
Field3D tmp;
tmp.allocate();
const auto& fpar = tosave.ynext(i);
for (auto j : fpar.getValidRegionWithDefault("RGN_NO_BOUNDARY")) {
tmp[j.yp(-i)] = fpar[j];
if (fpar.isAllocated()) {
for (auto j : tmp.getRegion("RGN_NOY")) {
tmp[j] = fpar[j.yp(i)];
}
opt[fmt::format("{}_y{:+d}", name, i)] = tmp;
} else {
if (tosave.isFci()) { // likely an error
throw BoutException(
"Tried to save parallel fields - but parallel field {} is not allocated",
i);
}
}
opt[fmt::format("{}_y{:+d}", name, i)] = tmp;
}
}
}
Expand Down
Loading