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

A class for generating packs of particles. More...

#include <gen_pack.hpp>

Static Public Member Functions

static VecXT< ParticleGetGridPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_x, int num_y, int num_z, const VecXT< Shape * > &shape_list)
 Generate a grid of particles.
 
static VecXT< ParticleGetGridPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_x, int num_y, int num_z, Shape *shape)
 Generate a grid of particles with a single shape.
 
static VecXT< BondedSpheresGetGridPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_x, int num_y, int num_z, const BondedSpheres &bonded_spheres_template)
 Generate a grid of bonded spheres.
 
static VecXT< BondedVoronoisGetGridPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_x, int num_y, int num_z, const BondedVoronois &bonded_voronois_template)
 Generate a grid of bonded Voronois.
 
static VecXT< ParticleGetVoronoiPack (STLModel const &st_model, int num_p, const VecXT< Shape * > &shape_list)
 Generate a pack of particles inside a mesh using Voronoi tessellation.
 
static VecXT< ParticleGetVoronoiPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_p, const VecXT< Shape * > &shape_list)
 Generate a pack of particles inside a bounding box using Voronoi tessellation.
 
static VecXT< ParticleGetVoronoiPack (double len_x, double len_y, double len_z, double center_x, double center_y, double center_z, int num_p, Shape *shape)
 Generate a pack of particles inside a bounding box using Voronoi tessellation with a single shape.
 
static VecXT< ParticleGetVoronoiPack (STLModel const &st_model, int num_p, Shape *shape)
 Generate a pack of particles inside a mesh using Voronoi tessellation with a single shape.
 

Detailed Description

A class for generating packs of particles.

Member Function Documentation

◆ GetGridPack() [1/4]

VecXT< BondedSpheres > PackGenerator::GetGridPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_x,
int num_y,
int num_z,
const BondedSpheres & bonded_spheres_template )
static

Generate a grid of bonded spheres.

Generates a grid of bonded spheres with the specified dimensions and number of points in each direction, using the given template as a reference. Each sphere would have random orientation.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_xThe number of points in the x direction.
num_yThe number of points in the y direction.
num_zThe number of points in the z direction.
bonded_spheres_templateThe template to use for generating bonded spheres.
Returns
List of generated bonded spheres.

◆ GetGridPack() [2/4]

VecXT< BondedVoronois > PackGenerator::GetGridPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_x,
int num_y,
int num_z,
const BondedVoronois & bonded_voronois_template )
static

Generate a grid of bonded Voronois.

Generates a grid of bonded Voronois with the specified dimensions and number of points in each direction, using the given template as a reference. Each Voronoi would have random orientation.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_xThe number of points in the x direction.
num_yThe number of points in the y direction.
num_zThe number of points in the z direction.
bonded_voronois_templateThe template to use for generating bonded Voronois.
Returns
List of generated bonded Voronois.

◆ GetGridPack() [3/4]

VecXT< Particle > PackGenerator::GetGridPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_x,
int num_y,
int num_z,
const VecXT< Shape * > & shape_list )
static

Generate a grid of particles.

Generates a grid of particles with the specified dimensions and number of points in each direction. Each generated particle would have a shape that is randomly selected from the given shape library.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_xThe number of points in the x direction.
num_yThe number of points in the y direction.
num_zThe number of points in the z direction.
shape_listReference to shape library.
Returns
List of generated particles.

◆ GetGridPack() [4/4]

VecXT< Particle > PackGenerator::GetGridPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_x,
int num_y,
int num_z,
Shape * shape )
static

Generate a grid of particles with a single shape.

Generates a grid of particles with the specified dimensions and number of points in each direction. Each generated particle would have the same shape.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_xThe number of points in the x direction.
num_yThe number of points in the y direction.
num_zThe number of points in the z direction.
shapeA pointer to the shape to use for all particles.
Returns
List of generated particles.

◆ GetVoronoiPack() [1/4]

VecXT< Particle > PackGenerator::GetVoronoiPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_p,
const VecXT< Shape * > & shape_list )
static

Generate a pack of particles inside a bounding box using Voronoi tessellation.

Generates a pack of particles with the specified number inside the given bounding box using Voronoi tessellation. Each generated particle would have a shape that is randomly selected from the given shape library.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_pThe number of particles to generate.
shape_listReference to shape library.
Returns
List of generated particles.

◆ GetVoronoiPack() [2/4]

VecXT< Particle > PackGenerator::GetVoronoiPack ( double len_x,
double len_y,
double len_z,
double center_x,
double center_y,
double center_z,
int num_p,
Shape * shape )
static

Generate a pack of particles inside a bounding box using Voronoi tessellation with a single shape.

Generates a pack of particles with the specified number inside the given bounding box using Voronoi tessellation. Each generated particle would have the same shape.

Parameters
len_xThe length of the box in the x direction.
len_yThe length of the box in the y direction.
len_zThe length of the box in the z direction.
center_xThe centroid of the box in the x direction.
center_yThe centroid of the box in the y direction.
center_zThe centroid of the box in the z direction.
num_pThe number of particles to generate.
shapeA pointer to the shape to use for all particles.
Returns
List of generated particles.

◆ GetVoronoiPack() [3/4]

VecXT< Particle > PackGenerator::GetVoronoiPack ( STLModel const & st_model,
int num_p,
const VecXT< Shape * > & shape_list )
static

Generate a pack of particles inside a mesh using Voronoi tessellation.

Generates a pack of particles with the specified number inside the given STL model using Voronoi tessellation. Each generated particle would have a shape that is randomly selected from the given shape library.

Parameters
st_modelThe STL model to generate the particles inside.
num_pThe number of particles to generate.
shape_listReference to shape library.
Returns
List of generated particles.

◆ GetVoronoiPack() [4/4]

VecXT< Particle > PackGenerator::GetVoronoiPack ( STLModel const & st_model,
int num_p,
Shape * shape )
static

Generate a pack of particles inside a mesh using Voronoi tessellation with a single shape.

Generates a pack of particles with the specified number inside the given STL model using Voronoi tessellation. Each generated particle would have the same shape.

Parameters
st_modelThe STL model to generate the particles inside.
num_pThe number of particles to generate.
shapeA pointer to the shape to use for all particles.
Returns
List of generated particles.

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