Cells¶
-
class
Cells
¶ Divide a cuboid domain into cells.
Public Functions
-
void
create
(const double min_length, const std::vector<double> side_lengths)¶ Create the number, length and neighbors. By default, abort if there aren’t more than \(3^D\) cells, where D is the dimension.
-
int
num_total
() const¶ Return the number.
-
int
num
(const int dimension) const¶ Return the number in a dimension.
-
std::vector<int>
num
() const¶ Return the number.
-
void
set_group
(const int index = 0)¶ Set the group.
-
int
group
() const¶ Return the group.
-
void
clear
()¶ Clear all private member data.
-
const std::vector<std::vector<int>> &
neighbor
() const¶ Return the neighbors. The first index is the cell. The second is a list of neighboring cells (including self).
-
const std::vector<Select> &
particles
() const¶ Return the particles and sites within the cells. The first index is the cell index.
-
int
num_sites
() const¶ Return the number of particles within the cells.
-
int
id
(const std::vector<double> &scaled_coord) const¶ Return the unique number cell in which the scaled coordinate resides. Scaled coordinates are positions divided by the respective domain size.
-
int
type
() const¶ Return the type.
-
void
set_type
(const int type)¶ Set the type.
-
void