Skip to content

Commit 1e44d7b

Browse files
committed
Updated Add Component APIs
1 parent f329e60 commit 1e44d7b

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

src/Particle/ParticleContainer.H

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,6 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr)
211211
.def("add_int_comp", &ParticleContainerType::template AddIntComp<bool>,
212212
py::arg("communicate")=true, "add a new runtime component with type Int")
213213

214-
.def("resize_runtime_real_comp", &ParticleContainerType::ResizeRuntimeRealComp,
215-
py::arg("new_size"), py::arg("communicate"),
216-
"Resize the Real runtime components (SoA)")
217-
.def("resize_runtime_int_comp", &ParticleContainerType::ResizeRuntimeIntComp,
218-
py::arg("new_size"), py::arg("communicate"),
219-
"Resize the Int runtime components (SoA)")
220-
221214
.def_property_readonly("finest_level", &ParticleContainerBase::finestLevel)
222215

223216
// ParticleContainer ( const ParticleContainer &) = delete;

src/amrex/StructOfArrays.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def soa_to_numpy(self, copy=False):
114114
real_comp_names = self.soa_real_comps(self.num_real_comps, rotate=False)
115115

116116
for idx_real in range(self.num_real_comps):
117-
print(idx_real, real_comp_names[idx_real], self.get_real_data(idx_real).size())
118117
soa_view.real[real_comp_names[idx_real]] = self.get_real_data(
119118
idx_real
120119
).to_numpy(copy=copy)

tests/test_particleContainer.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ def particle_container(Npart, std_geometry, distmap, boxarr, std_real_box):
5252
pc.add_int_comp(True)
5353
pc.add_int_comp(True)
5454

55-
# can be removed after
56-
# https://github.com/AMReX-Codes/amrex/pull/3615
57-
pc.resize_runtime_real_comp(1, True)
58-
pc.resize_runtime_int_comp(2, True)
59-
6055
# assign some values to runtime components
6156
for lvl in range(pc.finest_level + 1):
6257
for pti in pc.iterator(pc, level=lvl):
@@ -83,11 +78,6 @@ def soa_particle_container(Npart, std_geometry, distmap, boxarr, std_real_box):
8378
pc.add_int_comp(True)
8479
pc.add_int_comp(True)
8580

86-
# can be removed after
87-
# https://github.com/AMReX-Codes/amrex/pull/3615
88-
pc.resize_runtime_real_comp(1, True)
89-
pc.resize_runtime_int_comp(2, True)
90-
9181
# assign some values to runtime components
9282
for lvl in range(pc.finest_level + 1):
9383
for pti in pc.iterator(pc, level=lvl):
@@ -454,7 +444,7 @@ def test_pc_df(particle_container, Npart):
454444
print(df.columns)
455445
print(df)
456446

457-
assert len(df.columns) == 12
447+
assert len(df.columns) == 14
458448

459449

460450
@pytest.mark.skipif(
@@ -545,4 +535,4 @@ def test_pc_df_mpi(particle_container, Npart):
545535
print(df.columns)
546536
print(df)
547537

548-
assert len(df.columns) == 12
538+
assert len(df.columns) == 14

0 commit comments

Comments
 (0)