Upon updating parthenon, @brryan found that Phoebus was crashing when restriction was called. The issue turned out to be a subtle interaction between Metadata and the custom prolongation/restriction operations. Essentially primitive and/or conserved variables need to be set for prolongation/restriction when they are used for boundary conditions. However, they were being set with an "empty" prolongation/restriction operator and the code was crashing when the stored functor was a nullptr.
This was happening because because Metadata::FillGhost was being set after the constructor for the metadata object was called, but the default prolongation/restriction ops are currently only set when Metadata is constructed.
I fix this issue here by creating Metadata objects once and not changing their flags after construction. There should also be some changes in parthenon to guard against this in the future. But this fixes Phoebus for now.
I also tweak the eos_phoebus.cpp file while I was debugging. Essentially I just moved the vector of valid names outside initialize.
PR Checklist
[ ] Adds a test for any bugs fixed. Adds tests for new features.
[x] Format your changes by calling scripts/bash/format.sh.
PR Summary
Upon updating parthenon, @brryan found that Phoebus was crashing when restriction was called. The issue turned out to be a subtle interaction between
Metadata
and the custom prolongation/restriction operations. Essentially primitive and/or conserved variables need to be set for prolongation/restriction when they are used for boundary conditions. However, they were being set with an "empty" prolongation/restriction operator and the code was crashing when the stored functor was anullptr
.This was happening because because
Metadata::FillGhost
was being set after the constructor for the metadata object was called, but the default prolongation/restriction ops are currently only set whenMetadata
is constructed.I fix this issue here by creating
Metadata
objects once and not changing their flags after construction. There should also be some changes inparthenon
to guard against this in the future. But this fixes Phoebus for now.I also tweak the
eos_phoebus.cpp
file while I was debugging. Essentially I just moved the vector of valid names outsideinitialize
.PR Checklist
scripts/bash/format.sh
.