-
Notifications
You must be signed in to change notification settings - Fork 50
Grid Interpolation
Sam Reeve edited this page Sep 12, 2024
·
2 revisions
Cabana::Grid provides methods for interpolating data back and forth between particles and grids: particle-to-grid (p2g) and grid-to-particle (g2p).
auto scalar_p2g =
Cabana::Grid::createScalarValueP2G( scalar_particle_field, -0.5 );
Cabana::Grid::p2g( scalar_p2g, particle_positions, num_particles,
Cabana::Grid::Spline<1>(), *scalar_halo, *scalar_grid_field );
auto scalar_value_g2p =
Cabana::Grid::createScalarValueG2P( scalar_particle_field, -0.5 );
Cabana::Grid::g2p( *scalar_grid_field, *scalar_halo, particle_positions,
num_particles, Cabana::Grid::Spline<1>(), scalar_value_g2p );
This is part of the Programming Guide series
Cabana - A Co-Designed Library for Exascale Particle Simulations