Skip to content
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

Particles: More Specializations #51

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Particle/ArrayOfStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void make_ArrayOfStructs(py::module &m)
}

void init_ArrayOfStructs(py::module& m) {
make_ArrayOfStructs<7,0> (m);
make_ArrayOfStructs< 0, 0> (m);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RTSandberg this one should cause no problems, does it?

     make_ArrayOfStructs< 0, 0> (m);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of any reason it should cause problems, we even have some tests in place to keep the user from accidentally referencing non-existent real or int data

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! :)

make_ArrayOfStructs< 7, 0> (m);
make_ArrayOfStructs< 1, 1> (m);
make_ArrayOfStructs< 2, 1> (m);
}
11 changes: 7 additions & 4 deletions src/Particle/Particle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,11 @@ void init_Particle(py::module& m) {
;
py::enum_<PIdx::IntValues>(pidx, "IntValues")
;
make_Particle<PIdx::nRealAttribs, PIdx::nIntAttribs> (m);
make_Particle<1, 1> (m);
make_Particle<2, 1> (m);
make_Particle<3, 2> (m);
make_Particle< PIdx::nRealAttribs, PIdx::nIntAttribs > (m);
make_Particle< 1, 1 > (m);
make_Particle< 2, 1 > (m);
make_Particle< 3, 2 > (m);
make_Particle< 4, 0 > (m); // HiPACE++ 22.07
make_Particle< 5, 0 > (m); // ImpactX 22.07
make_Particle< 37, 1> (m); // HiPACE++ 22.07
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments indicating which versions are for which codes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, thanks :)

Thank you for documenting the task in #49 as well ✨

}
5 changes: 4 additions & 1 deletion src/Particle/ParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,8 @@ void init_ParticleContainer(py::module& m) {
// TODO: we might need to move all or most of the defines in here into a
// test/example submodule, so they do not collide with downstream projects
make_ParticleContainer< 1, 1, 2, 1> (m);
make_ParticleContainer<0,0,7,0> (m);
make_ParticleContainer< 0, 0, 4, 0> (m); // HiPACE++ 22.07
make_ParticleContainer< 0, 0, 5, 0> (m); // ImpactX 22.07
make_ParticleContainer< 0, 0, 7, 0> (m);
make_ParticleContainer< 0, 0, 37, 1> (m); // HiPACE++ 22.07
}
5 changes: 4 additions & 1 deletion src/Particle/ParticleTile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@ void init_ParticleTile(py::module& m) {
// TODO: we might need to move all or most of the defines in here into a
// test/example submodule, so they do not collide with downstream projects
make_ParticleTile< 1, 1, 2, 1> (m);
make_ParticleTile<0,0,7,0> (m);
make_ParticleTile< 0, 0, 4, 0> (m); // HiPACE++ 22.07
make_ParticleTile< 0, 0, 5, 0> (m); // ImpactX 22.07
make_ParticleTile< 0, 0, 7, 0> (m);
make_ParticleTile< 0, 0, 37, 1> (m); // HiPACE++ 22.07
}
7 changes: 5 additions & 2 deletions src/Particle/StructOfArrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ void make_StructOfArrays(py::module &m)


void init_StructOfArrays(py::module& m) {
make_StructOfArrays< 2, 1> (m);
make_StructOfArrays<7,0> (m);
make_StructOfArrays< 2, 1 > (m);
make_StructOfArrays< 4, 0 > (m); // HiPACE++ 22.07
make_StructOfArrays< 5, 0 > (m); // ImpactX 22.07
make_StructOfArrays< 7, 0 > (m);
make_StructOfArrays< 37, 1> (m); // HiPACE++ 22.07
}