-
Notifications
You must be signed in to change notification settings - Fork 32
add member variable "name" to ParticleAttribute Base class #434
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 member variable "name" to ParticleAttribute Base class #434
Conversation
|
dont merge yet, I realised I probably should change something |
|
General question - the kokkos::View has a label https://kokkos.org/kokkos-core-wiki/API/core/view/view.html#_CPPv4NK4View5labelEv would it make sens to simply use the view's label for the attribute (assuming the data is always available from a view somewhere)? |
|
Yes, that could make sense, but I am not so sure how straight forward such an implementation would be. I looked into this a bit. The Kokkos::View label/name needs to be set during construction. Data is only allocated when we call for the attribute. Kokkos doesn't seem to have a constructor that let's us set the name but on all matters else behaves like the default constructor (which is non allocating). I am not too experienced with Kokkos so I am not quite sure if we are allowed to use one of the standard allocating constructor to serve this purpose by just not passing any variables for it's extent? It sais it has the following requirement: Requirements: I tried this by defining constructors for and using it in the constructor of particleBase and particleContianer: I shortly tested this on my current insitu-vis-steer branch running serial and this seems to work. |
src/Particle/ParticleAttribBase.h
Outdated
|
|
||
| protected: | ||
| const size_type* localNum_mp; | ||
| std::string name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use name_m
|
What John mentioned is indeed the best solution. In have a feeling that in the interest of time (my SC milestone) we maybe do this in 2 steps: first the easy simple one with name_m and the later on the one with the view name. |
Added:
ParticAttribBase
ParticleAttrib:
ParticleBase:
Alpine: