NetDEM v1.0
Loading...
Searching...
No Matches
netdem::CellManager Class Reference

A class responsible for managing cells in a simulation grid. More...

#include <cell_manager.hpp>

Public Member Functions

 CellManager ()
 Default constructor for the CellManager class.
 
std::tuple< Vec3d, Vec3dGetBound () const
 Get the bounds of the simulation.
 
Vec3d const & GetSpacing () const
 Get the spacing of the cells.
 
Vec3i const & GetCellSizes () const
 Get the sizes of the cells in each dimension.
 
VecXT< VecXT< VecXT< Cell > > > const & GetCellList ()
 Get the bounds of the simulation.
 
Cell *const GetCell (int i, int j, int k)
 
void Init ()
 Initialize the simulation grid by populating it with cells.
 
void SetBound (double bmin_x, double bmin_y, double bmin_z, double bmax_x, double bmax_y, double bmax_z)
 Set the bounds of the simulation.
 
void SetSpacing (double s_x, double s_y, double s_z)
 Set the spacing between adjacent cells in the simulation grid.
 
std::tuple< Vec3i, Vec3iGetOverlappedCells (Vec3d const &bmin, Vec3d const &bmax)
 Determine which cells overlap with a given bounding box.
 
Vec3i GetOverlappedCell (Vec3d const &pos)
 Determine which cell a given point is in.
 
STLModel GetSTLModel ()
 Generate an STL model for visualization purposes.
 

Detailed Description

A class responsible for managing cells in a simulation grid.

This class is responsible for creating and maintaining the cells in the simulation grid. It also provides functionality to determine which cells overlap with a given bounding box, and to generate an STL model for visualization purposes.

Constructor & Destructor Documentation

◆ CellManager()

CellManager::CellManager ( )

Default constructor for the CellManager class.

Member Function Documentation

◆ GetBound()

tuple< Vec3d, Vec3d > CellManager::GetBound ( ) const

Get the bounds of the simulation.

◆ GetCell()

Cell *const CellManager::GetCell ( int i,
int j,
int k )

◆ GetCellList()

VecXT< VecXT< VecXT< Cell > > > const & CellManager::GetCellList ( )

Get the bounds of the simulation.

◆ GetCellSizes()

Vec3i const & CellManager::GetCellSizes ( ) const

Get the sizes of the cells in each dimension.

◆ GetOverlappedCell()

Vec3i CellManager::GetOverlappedCell ( Vec3d const & pos)

Determine which cell a given point is in.

Parameters
posThe position of the point.
Returns
The index of the cell containing the point.

◆ GetOverlappedCells()

tuple< Vec3i, Vec3i > CellManager::GetOverlappedCells ( Vec3d const & bmin,
Vec3d const & bmax )

Determine which cells overlap with a given bounding box.

Parameters
bminThe minimum coordinates of the bounding box.
bmaxThe maximum coordinates of the bounding box.
Returns
A tuple containing the indices of the first and last overlapping cells in each dimension.

◆ GetSpacing()

Vec3d const & CellManager::GetSpacing ( ) const

Get the spacing of the cells.

◆ GetSTLModel()

STLModel CellManager::GetSTLModel ( )

Generate an STL model for visualization purposes.

Returns
An STLModel object representing the simulation grid.

◆ Init()

void CellManager::Init ( )

Initialize the simulation grid by populating it with cells.

◆ SetBound()

void CellManager::SetBound ( double bmin_x,
double bmin_y,
double bmin_z,
double bmax_x,
double bmax_y,
double bmax_z )

Set the bounds of the simulation.

Parameters
bmin_xThe minimum x-coordinate of the simulation bounds.
bmin_yThe minimum y-coordinate of the simulation bounds.
bmin_zThe minimum z-coordinate of the simulation bounds.
bmax_xThe maximum x-coordinate of the simulation bounds.
bmax_yThe maximum y-coordinate of the simulation bounds.
bmax_zThe maximum z-coordinate of the simulation bounds.

◆ SetSpacing()

void CellManager::SetSpacing ( double s_x,
double s_y,
double s_z )

Set the spacing between adjacent cells in the simulation grid.

Parameters
s_xThe spacing along the x-axis.
s_yThe spacing along the y-axis.
s_zThe spacing along the z-axis.
Examples
1_test_triaxial_comp.cpp, 91_triaixal_comp.cpp, 91_triaixal_comp_trimesh.cpp, 92_angle_of_repose.cpp, 92_angle_repose_trimesh.cpp, 93_triaixal_comp_trimesh.cpp, 94_angle_repose_trimesh.cpp, and 97_triaixal_comp_sphere_geom.cpp.

The documentation for this class was generated from the following files: