diff --git a/src/CabanaPD_Particles.hpp b/src/CabanaPD_Particles.hpp index 353eba7b..e13ec82b 100644 --- a/src/CabanaPD_Particles.hpp +++ b/src/CabanaPD_Particles.hpp @@ -169,6 +169,8 @@ class Particles // 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 ); @@ -190,12 +192,6 @@ class Particles 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(), zero ); - dy = local_mesh.measure( Cajita::Edge(), zero ); - dz = local_mesh.measure( Cajita::Edge(), zero ); } template