From 1e44d7b06500c60ca878a885f45f9316c02df350 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 1 Apr 2024 10:00:55 -0700 Subject: [PATCH] Updated Add Component APIs --- src/Particle/ParticleContainer.H | 7 ------- src/amrex/StructOfArrays.py | 1 - tests/test_particleContainer.py | 14 ++------------ 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/Particle/ParticleContainer.H b/src/Particle/ParticleContainer.H index 5de9ff0c..c3abf899 100644 --- a/src/Particle/ParticleContainer.H +++ b/src/Particle/ParticleContainer.H @@ -211,13 +211,6 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr) .def("add_int_comp", &ParticleContainerType::template AddIntComp, py::arg("communicate")=true, "add a new runtime component with type Int") - .def("resize_runtime_real_comp", &ParticleContainerType::ResizeRuntimeRealComp, - py::arg("new_size"), py::arg("communicate"), - "Resize the Real runtime components (SoA)") - .def("resize_runtime_int_comp", &ParticleContainerType::ResizeRuntimeIntComp, - py::arg("new_size"), py::arg("communicate"), - "Resize the Int runtime components (SoA)") - .def_property_readonly("finest_level", &ParticleContainerBase::finestLevel) // ParticleContainer ( const ParticleContainer &) = delete; diff --git a/src/amrex/StructOfArrays.py b/src/amrex/StructOfArrays.py index 784b6be3..7dff6128 100644 --- a/src/amrex/StructOfArrays.py +++ b/src/amrex/StructOfArrays.py @@ -114,7 +114,6 @@ 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) diff --git a/tests/test_particleContainer.py b/tests/test_particleContainer.py index 00dc8a53..b62f6882 100644 --- a/tests/test_particleContainer.py +++ b/tests/test_particleContainer.py @@ -52,11 +52,6 @@ def particle_container(Npart, std_geometry, distmap, boxarr, std_real_box): pc.add_int_comp(True) pc.add_int_comp(True) - # can be removed after - # https://github.com/AMReX-Codes/amrex/pull/3615 - pc.resize_runtime_real_comp(1, True) - pc.resize_runtime_int_comp(2, True) - # assign some values to runtime components for lvl in range(pc.finest_level + 1): for pti in pc.iterator(pc, level=lvl): @@ -83,11 +78,6 @@ def soa_particle_container(Npart, std_geometry, distmap, boxarr, std_real_box): pc.add_int_comp(True) pc.add_int_comp(True) - # can be removed after - # https://github.com/AMReX-Codes/amrex/pull/3615 - pc.resize_runtime_real_comp(1, True) - pc.resize_runtime_int_comp(2, True) - # assign some values to runtime components for lvl in range(pc.finest_level + 1): for pti in pc.iterator(pc, level=lvl): @@ -454,7 +444,7 @@ def test_pc_df(particle_container, Npart): print(df.columns) print(df) - assert len(df.columns) == 12 + assert len(df.columns) == 14 @pytest.mark.skipif( @@ -545,4 +535,4 @@ def test_pc_df_mpi(particle_container, Npart): print(df.columns) print(df) - assert len(df.columns) == 12 + assert len(df.columns) == 14