NetDEM v1.0
Loading...
Searching...
No Matches
dem_fragment.hpp
Go to the documentation of this file.
1#pragma once
2
4#include "shape.hpp"
5#include "stl_model.hpp"
6
7namespace netdem {
8
18public:
23
27 double sphere_size{1.0};
28
32 Vec3d pos{0, 0, 0};
33
38
42 Vec3d vel{0, 0, 0};
43
47 Vec3d spin{0, 0, 0};
48
69 void InitLevelSet(double corner_x, double corner_y, double corner_z,
70 double sp, int dim_x, int dim_y, int dim_z);
71
81 void ResolverOverlap(DEMFragment *const frag_q);
82
89 void ReInitSTLModel();
90
91public:
97};
98
99} // namespace netdem
A class representing a fragment in a discrete element method simulation.
Definition dem_fragment.hpp:17
Vec3d vel
The velocity of this fragment.
Definition dem_fragment.hpp:42
void InitLevelSet(double corner_x, double corner_y, double corner_z, double sp, int dim_x, int dim_y, int dim_z)
Initializes the level set function for this fragment.
Definition dem_fragment.cpp:9
Vec3d spin
The angular velocity of this fragment.
Definition dem_fragment.hpp:47
Shape::Type shape_type
The type of shape used to represent this fragment.
Definition dem_fragment.hpp:22
void ResolverOverlap(DEMFragment *const frag_q)
Resolves any overlaps between this fragment and another fragment.
Definition dem_fragment.cpp:65
STLModel stl_model
The STL model used to represent this fragment.
Definition dem_fragment.hpp:37
LevelSetFunction level_set
The level set function used to represent the interface between this fragment and its surrounding medi...
Definition dem_fragment.hpp:96
void ReInitSTLModel()
Reinitializes the STL model for this fragment.
Definition dem_fragment.cpp:104
double sphere_size
The size of the sphere used to represent this fragment.
Definition dem_fragment.hpp:27
Vec3d pos
The position of this fragment in 3D space.
Definition dem_fragment.hpp:32
Class for representing a level set function on a regular grid.
Definition level_set_function.hpp:17
Class for working with STL models.
Definition stl_model.hpp:17
Type
Enumeration for different types of shapes.
Definition shape.hpp:20
@ trimesh
Definition shape.hpp:25
Definition bond_entry.hpp:7
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18