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

Mb/charge exchange kernel new #205

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

mbukaea
Copy link
Collaborator

@mbukaea mbukaea commented Aug 14, 2023

Description

Please include a summary of changes, motivation and context for this PR.

Fixes #178
Fixes #194

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Requires documentation updates

Testing

Please describe the tests that you ran to verify your changes and provide instructions for reproducibility. Please also list any relevant details for your test configuration.

  • Test Foo in /test/path/to/file_for_test_Foo.cpp
  • Description of test Foo
  • Test Bar in /test/path/to/file_for_test_Bar.cpp
  • Description of test Bar

Test Configuration:

  • OS:
  • SYCL implementation:
  • MPI details:
  • Hardware:

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any new dependencies are automatically built for users via cmake
  • I have used understandable variable names
  • I have run clang-format against my *.hpp and *.cpp changes
  • I have run cmake-format against my changes to CMakeLists.txt
  • I have run black against changes to *.py
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@mbukaea mbukaea added the work in progess Draft PR - not to merge! label Aug 14, 2023
@mbukaea mbukaea marked this pull request as draft August 14, 2023 10:31
inline void compute(int step) {
if (momentum_recording_step > 0) {
if (step % momentum_recording_step == 0) {
const double momentum_particles_0 = this->compute_particle_momentum_0();
Copy link
Contributor

Choose a reason for hiding this comment

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

Guessing these should be calls to get_initial_* and the calls to get_initial_* should in turn call compute_initial_* and/or call the compute methods in some setup/constructor.

NESO_PARTICLES_KERNEL_START
const INT cellx = NESO_PARTICLES_KERNEL_CELL;
const INT layerx = NESO_PARTICLES_KERNEL_LAYER;

Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't store momentum when we have mass and velocity already stored on the particles. Unless we need momentum in enough places to amortise the cost of the extra data movement.




inline double compute_fluid_0_momentum() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should generalise this class for n dimensions (where the number of dimensions are passed in the constructor). Otherwise we will end up with 2,3 copies of the same function with the only difference being an index.

@@ -152,11 +152,11 @@ TEST(ParticleFunctionProjection, DisContScalarExpQuantity) {
.wait_and_throw();

// create projection object
auto field_project = std::make_shared<FieldProject<DisContField>>(
auto src_field_project = std::make_shared<FieldProject<DisContField>>(
Copy link
Contributor

Choose a reason for hiding this comment

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

These diffs look like a find/replace edited an additional file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progess Draft PR - not to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make these vector members const non-refs i.e. copies Port the neutral capability to Hermes3
2 participants