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

Particle-grid migrate #395

Merged
merged 9 commits into from
Jun 18, 2021
Merged

Particle-grid migrate #395

merged 9 commits into from
Jun 18, 2021

Conversation

streeve
Copy link
Member

@streeve streeve commented May 20, 2021

This adds particle-grid migrate in Cajita, wrapping calls to Cabana::Distributor, Cabana::migrate

  • Implementation (stolen from ExaMPM) determines new ranks destinations and wraps through periodic boundaries
  • particleGridMigrate uses implementation functions and calls migrate
  • 2d and 3d tests

This supersedes #263 and is part of the very old #77

@streeve streeve added the enhancement New feature or request label May 20, 2021
@streeve streeve requested a review from sslattery May 20, 2021 17:04
@streeve streeve self-assigned this May 20, 2021
@streeve streeve force-pushed the pg_dist branch 2 times, most recently from 83cec77 to b8e0c9d Compare May 20, 2021 21:19
@streeve streeve force-pushed the pg_dist branch 2 times, most recently from 3019a5c to 67afc76 Compare May 28, 2021 15:31
@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #395 (62235e1) into master (8a4825a) will increase coverage by 0.0%.
The diff coverage is 95.1%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #395   +/-   ##
======================================
  Coverage    93.0%   93.0%           
======================================
  Files          36      37    +1     
  Lines        4194    4269   +75     
======================================
+ Hits         3902    3973   +71     
- Misses        292     296    +4     
Impacted Files Coverage Δ
cajita/src/Cajita_ParticleGridDistributor.hpp 94.2% <94.2%> (ø)
core/src/Cabana_CommunicationPlan.hpp 95.6% <100.0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a4825a...62235e1. Read the comment docs.

@streeve
Copy link
Member Author

streeve commented May 28, 2021

Ok @sslattery this is ready for review. I will keep working on the similar arbitrary dimension halo functionality and create a separate PR

Copy link
Collaborator

@sslattery sslattery left a comment

Choose a reason for hiding this comment

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

Just a few small changes

cajita/src/Cajita_ParticleGridDistributor.hpp Outdated Show resolved Hide resolved

for ( std::size_t d = 0; d < num_space_dim; ++d )
{
local_low[d] = local_mesh.lowCorner( Cajita::Own(), d );
Copy link
Collaborator

Choose a reason for hiding this comment

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

We do this in a lot of places. No need to add in this PR but it would be nice to have functions for these that do not take a dimension argument and just return a Kokkos::Array for all dimensions.

cajita/src/Cajita_ParticleGridDistributor.hpp Outdated Show resolved Hide resolved
destinations( p ) = neighbor_ranks( neighbor_index );

// Shift particles through periodic boundaries.
for ( std::size_t d = 0; d < num_space_dim; ++d )
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice - good kernel fusion. I think we can also eventually find a way to fuse in the count kernel as well so we have only a single setup kernel.

cajita/src/Cajita_ParticleGridDistributor.hpp Outdated Show resolved Hide resolved
cajita/src/Cajita_ParticleGridDistributor.hpp Outdated Show resolved Hide resolved
cajita/src/Cajita_ParticleGridDistributor.hpp Outdated Show resolved Hide resolved
cajita/unit_test/tstParticleGridDistributor2d.hpp Outdated Show resolved Hide resolved
cajita/unit_test/tstParticleGridDistributor3d.hpp Outdated Show resolved Hide resolved
@streeve
Copy link
Member Author

streeve commented Jun 10, 2021

@sslattery should be ready for final review

@sslattery sslattery merged commit 3de8037 into ECP-copa:master Jun 18, 2021
@streeve streeve mentioned this pull request Jun 21, 2021
@streeve streeve deleted the pg_dist branch August 5, 2021 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants