Skip to content

Commit

Permalink
Update invalid indices to allow for no-op loops (#577)
Browse files Browse the repository at this point in the history
* Make second invalid index more negative

* Changelog

Co-authored-by: Jonas Lippuner <jlippuner@lanl.gov>
  • Loading branch information
brryan and jlippuner authored Jul 28, 2021
1 parent 8fa7f47 commit 6ee1509
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Current develop

### Added (new features/APIs/variables/...)
- [[PR 577]](https://github.com/lanl/parthenon/pull/577) Update invalid indices to allow for no-op loops
- [[PR 564]](https://github.com/lanl/parthenon/pull/564) Add EstimateTimestep to particles example task list
- [[PR 557]](https://github.com/lanl/parthenon/pull/557) Re-enable `InitMeshBlockUserData` so data can be set per-remeshing
- [[PR 509]](https://github.com/lanl/parthenon/pull/509) Add `elapsed_main`, `elapsed_cycle`, and `elapsed_LBandAMR` functions to `Driver` as static functions to enable access to timing information in output and restart files.
Expand Down
2 changes: 1 addition & 1 deletion src/interface/variable_pack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PackIndexMap {
// It will silently return invalid indices if the key doesn't exist (e.g. misspelled or
// sparse id not part of label)
const vpack_types::IndexPair &operator[](const std::string &key) const {
static const vpack_types::IndexPair invalid_indices(-1, -1);
static const vpack_types::IndexPair invalid_indices(-1, -2);
auto itr = map_.find(key);
if (itr == map_.end()) {
return invalid_indices;
Expand Down

0 comments on commit 6ee1509

Please sign in to comment.