106 void Translate(
double pos_x,
double pos_y,
double pos_z);
162 void SaveAsVTK(std::string
const &file_name);
206 std::tuple<Vec3d, double> PolyCentroid(
const VecXT<Vec3d> &verts);
212 void RefreshPointers();
A class representing a set of bonded Voronoi cells generated from an STL file.
Definition bonded_voronois.hpp:19
void InitFromSTL(std::string const &filename, int num_voros)
Initialize the Voronoi cells from an STL file with the given number of cells.
VecXT< TriMesh > trimesh_list
The list of TriMesh objects representing the Voronoi cells.
Definition bonded_voronois.hpp:24
void SetBondModel(ContactModel *cnt_model)
Set the contact model used to calculate the forces between particles.
Definition bonded_voronois.cpp:69
ContactModel * bond_model
The contact model used to calculate the forces between particles.
Definition bonded_voronois.hpp:54
void SaveAsVTK(std::string const &file_name)
Save the Voronoi cells as a VTK file.
Definition bonded_voronois.cpp:212
VecXT< Vec2i > bond_pair_list
The list of bonded pairs between particles.
Definition bonded_voronois.hpp:39
BondedVoronois & operator=(BondedVoronois const &bp)
Copy assignment operator for the BondedVoronois class.
Definition bonded_voronois.cpp:39
int cvt_max_iters
The maximum number of iterations for the CVT algorithm.
Definition bonded_voronois.hpp:44
void Translate(double pos_x, double pos_y, double pos_z)
Translate the Voronoi cells by a given amount.
Definition bonded_voronois.cpp:79
Vec3d GetCentroid()
Calculate the centroid of the Voronoi cells.
Definition bonded_voronois.cpp:132
VecXT< Particle > particle_list
The list of particles in the Voronoi cells.
Definition bonded_voronois.hpp:29
BondedVoronois()
Default constructor for the BondedVoronois class.
Definition bonded_voronois.cpp:11
VecXT< ContactPP > contact_list
The list of contact pairs between particles.
Definition bonded_voronois.hpp:34
void InitBonds()
Initialize the bonded pairs between particles.
Definition bonded_voronois.cpp:289
void ImportToScene(Scene *const scene) const
Import the BondedVoronois object to a Scene object.
Definition bonded_voronois.cpp:335
void RotateByRodrigues(double rot_angle, double rot_axis_x, double rot_axis_y, double rot_axis_z)
Rotate the Voronoi cells by a given angle around a given axis using the Rodrigues formula.
Definition bonded_voronois.cpp:99
void MakePorosity(double porosity)
Make the Voronoi cells porous by adding gaps between particles.
Definition bonded_voronois.cpp:193
double cvt_tol
The tolerance for convergence of the CVT algorithm.
Definition bonded_voronois.hpp:49
Class for working with STL models.
Definition stl_model.hpp:17
A class for managing the elements in a DEM simulation. Scene behaves as a std container:
Definition scene.hpp:56
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18
dir_n
Definition json_serilization.hpp:19