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
Add PrimitiveId data structure #1399
Conversation
|
Why don't we just remove the |
|
Why can't you use IterationId? |
Could you just explicitly do |
@kidder I can name this type IterationId, specialize it to size_t and place it in DataStructures, that’s fine with me. I was told that other code needs a similar type for |
@wthrowe yes, only ObservationId needs a |
But we could change that, as I suggested above. |
I'm pretty sure changing |
Yes let’s do that. It means I can use a plain |
@markscheel would changing |
Superseded by #1408 |
Proposed changes
This data structure wraps a generic type
T
and provides avalue()
member function that allows it to be used byObservationId
.I intend to replace my
LinearSolver::IterationId
with aPrimitiveId<size_t>
and also use it as the type for the newNonlinearSolver::Tags::IterationId
, as well as other components of the elliptic solver that need to keep track of a step number, such as AMR and Multigrid cycles.I understand a
PrimitiveId<double>
is also useful for horizon finding and other components, so I'd appreciate some feedback. Putting this in as a draft PR for now to make sure we agree on the design before finalising this.Types of changes:
Component:
Code review checklist
clang-tidy
andIWYU
.For instructions on how to perform the CI checks locally refer to the Dev
guide on the Travis CI.
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.