Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Feb 16, 2024
1 parent f0b4a64 commit 01f6b58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/amrex/StructOfArrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def soa_to_numpy(self, copy=False):
real_comp_names = self.soa_real_comps(self.num_real_comps, rotate=False)

for idx_real in range(self.num_real_comps):
print(idx_real, real_comp_names[idx_real], self.get_real_data(idx_real).size())
soa_view.real[real_comp_names[idx_real]] = self.get_real_data(
idx_real
).to_numpy(copy=copy)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_particleContainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def test_per_cell(empty_particle_container, std_geometry, std_particle):
def test_soa_pc_numpy(soa_particle_container, Npart):
"""Used in docs/source/usage/compute.rst"""
pc = soa_particle_container
assert pc.number_of_particles_at_level(0) == Npart

class Config:
have_gpu = False
Expand Down Expand Up @@ -397,6 +398,7 @@ class Config:
def test_pc_numpy(particle_container, Npart):
"""Used in docs/source/usage/compute.rst"""
pc = particle_container
assert pc.number_of_particles_at_level(0) == Npart

class Config:
have_gpu = False
Expand Down

0 comments on commit 01f6b58

Please sign in to comment.