-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Custom Hierarchies #1432
base: dev
Are you sure you want to change the base?
[WIP] Custom Hierarchies #1432
Conversation
|
||
private: | ||
template <typename... Arg> | ||
iterator makeIterator(Arg &&...arg) |
Check notice
Code scanning / CodeQL
Unused local variable Note
return iterator{this, std::forward<Arg>(arg)...}; | ||
} | ||
template <typename... Arg> | ||
const_iterator makeIterator(Arg &&...arg) const |
Check notice
Code scanning / CodeQL
Unused local variable Note
test/CoreTest.cpp
Outdated
REQUIRE(r["x"].resetDataset(dset).numAttributes() == 0); /* unitSI */ | ||
// REQUIRE(r["y"].unitSI() == 1); | ||
REQUIRE(r["y"].resetDataset(dset).numAttributes() == 0); /* unitSI */ | ||
// REQUIRE(r["z"].unitSI() == 1); |
Check notice
Code scanning / CodeQL
Commented-out code Note
test/CoreTest.cpp
Outdated
// unitSI is set upon flushing | ||
// REQUIRE(r["x"].unitSI() == 1); | ||
REQUIRE(r["x"].resetDataset(dset).numAttributes() == 0); /* unitSI */ | ||
// REQUIRE(r["y"].unitSI() == 1); |
Check notice
Code scanning / CodeQL
Commented-out code Note
test/CoreTest.cpp
Outdated
@@ -966,6 +968,27 @@ | |||
#endif | |||
} | |||
|
|||
TEST_CASE("baserecord_test", "[core]") |
Check notice
Code scanning / CodeQL
Unused static function Note
autoRegistrar37
// for (auto it = this->container().begin(); it != end; ++it) | ||
// { | ||
// if (it->first == RecordComponent::SCALAR) | ||
// { | ||
// this->container().erase(it); | ||
// throw error::WrongAPIUsage(detail::NO_SCALAR_INSERT); | ||
// } | ||
// } |
Check notice
Code scanning / CodeQL
Commented-out code Note
// for (auto it = this->container().begin(); it != end; ++it) | ||
// { | ||
// if (it->first == RecordComponent::SCALAR) | ||
// { | ||
// this->container().erase(it); | ||
// throw error::WrongAPIUsage(detail::NO_SCALAR_INSERT); | ||
// } | ||
// } |
Check notice
Code scanning / CodeQL
Commented-out code Note
test/CoreTest.cpp
Outdated
@@ -1353,3 +1378,44 @@ | |||
UniquePtrWithLambda<int[]> arrptrFilledCustom{ | |||
new int[5]{}, [](int const *p) { delete[] p; }}; | |||
} | |||
|
|||
TEST_CASE("scalar_and_vector", "[core]") |
Check notice
Code scanning / CodeQL
Unused static function Note
autoRegistrar61
6c7f23a
to
c692dc7
Compare
c8a68a5
to
6c87958
Compare
86d8a73
to
399e6cd
Compare
comment removed, updated version in comments below |
8c28fab
to
605bd55
Compare
bef9c6b
to
b4779a3
Compare
For the meshesPath (equivalently for particlesPath), I have now implemented a prototype that does the following: A path
These options follow the following rules:
Remarks:
|
One nontrivial design question is how to deal with the traditional openPMD hierarchy, especially with the paths This suggests to me that in the extended openPMD standard with custom hierarchies these paths should be treated as "nothing special". Rather, they become the canonical, but not mandatory layout/organization of a simple openPMD dataset. Two somewhat tricky consequences from this point of view: 1. There might be more than 1 meshes paths in the same group Imo, the best solution is to consider
(Note: Since 2. There might be custom data inside |
b0d370e
to
4873e21
Compare
53f968c
to
ba10099
Compare
ba10099
to
d86fa69
Compare
31c7a25
to
1d47d17
Compare
795119c
to
eb2d3c5
Compare
eb2d3c5
to
0820e15
Compare
0820e15
to
18e9113
Compare
Introduction of iteration["meshes"].asContainerOf<Mesh>() as a more explicit variant for iteration.meshes.
Overload resolution
TODO: Since meshes/particles can no longer be directly addressed with this, maybe adapt the class hierarchy to disallow mixed groups that contain meshes, particles, groups and datasets at the same time. Only maybe though..
The have their own meaning now and are no longer just carefully maintained for backwards compatibility. Instead, they are supposed to serve as a shortcut to all openPMD data found further down the hierarchy.
443147c
to
fd7a443
Compare
for more information, see https://pre-commit.ci
TODO
SharedAttributableData
pattern to better implement variable-based encoding (whereseries.iterations
andseries.iterations[0]
are the same backend objects)Iteration::meshes
withIteration::mesh("subdir/E")
andIteration::allMeshes() -> std::map<std::string, Mesh>
, similarIteration::species("subdir/e")
andIteration::allSpecies() -> std::map<std::string, ParticleSpecies>
. But should it bespecies("subdir/particles/e")
orspecies("subdir/e")
?Diff: https://github.com/franzpoeschel/openPMD-api/compare/topic-remove-scalar-component..topic-custom-hierarchies