Skip to content

Commit

Permalink
fixup: use simpler interface to get cell spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Sep 28, 2023
1 parent d040a8f commit 630fc08
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/CabanaPD_Particles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ class Particles<DeviceType, PMB, Dimension>
// Create global mesh of MPI partitions.
auto global_mesh = Cajita::createUniformGlobalMesh(
low_corner, high_corner, num_cells );
for ( int d = 0; d < 3; d++ )
dx[d] = global_mesh.cellSize();

for ( int d = 0; d < 3; d++ )
global_mesh_ext[d] = global_mesh->extent( d );
Expand All @@ -190,12 +192,6 @@ class Particles<DeviceType, PMB, Dimension>
ghost_mesh_hi[d] = local_mesh.highCorner( Cajita::Ghost(), d );
local_mesh_ext[d] = local_mesh.extent( Cajita::Own(), d );
}

// Uniform mesh spacing.
int zero[3] = { 0, 0, 0 };
dx = local_mesh.measure( Cajita::Edge<Cajita::Dim::I>(), zero );
dy = local_mesh.measure( Cajita::Edge<Cajita::Dim::J>(), zero );
dz = local_mesh.measure( Cajita::Edge<Cajita::Dim::K>(), zero );
}

template <class ExecSpace>
Expand Down

0 comments on commit 630fc08

Please sign in to comment.