SCOREC / pumi-pic

support libraries for unstructured mesh particle in cell simulations on GPUs and CPUs
BSD 3-Clause "New" or "Revised" License
36 stars 14 forks source link

Unnessesary Functions in CSR #57

Closed MatthewChristoff closed 3 years ago

MatthewChristoff commented 3 years ago

I noticed that CSR has the following 4 functions implemented, and I don't think they should exist:

lid_t getNumPtcls() { return num_ptcls; }
kkLidView getOffsets() { return offsets; }
MTVs getPtcl_data() { return ptcl_data; }
lid_t getCapacity() { return capacity_; }

getNumPtcls() and getCapacity() already have equivalents inherited from particle_structure. getOffsets() and getPtcl_data() expose private member variables.

I'm aware that getPtcl_data() is currently being called in test_csr.cpp, but I'm not sure where else these functions are called from.

diamog commented 3 years ago

I'm going to clean up the CSR implementation and take care of these functions along with that.