![]() |
GranOO
3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
|
a singleton virtual class for representing periodic boundaries More...
#include <Full3D.hpp>
Public Member Functions | |
Full3D () | |
constructor More... | |
virtual | ~Full3D () |
destructor More... | |
void | set_bounding_box (const Shape::Box &box) |
set the length of the periodic box More... | |
void | set_bounding_box (double lx, double ly, double lz) |
set the length of the periodic box More... | |
void | scale_bounding_box (double factor) |
apply an expansion factor to the length of the periodic box More... | |
void | init_function () |
a function that must be triggered to initialize the periodic boundary More... | |
double | get_lx () const |
get the length of the periodic box along x More... | |
double | get_ly () const |
get the length of the periodic box along y More... | |
double | get_lz () const |
get the length of the periodic box along z More... | |
void | set_length_on_x (double value) |
set the length of the periodic box along x More... | |
void | set_length_on_y (double value) |
set the length of the periodic box along y More... | |
void | set_length_on_z (double value) |
set the length of the periodic box along z More... | |
void | distort_on_x (double angle) |
distort the periodic domain along x More... | |
void | distort_on_y (double angle) |
distort the periodic domain along y More... | |
void | distort_on_z (double angle) |
distort the periodic domain along z More... | |
virtual void | draw () |
a pure virtual function to draw the domain More... | |
virtual std::string | info () const |
get some info on the periodic bounday More... | |
virtual std::ostream & | write_ascii (std::ostream &out) const |
dump the current state of the periodic boundary in a ascii file (standard *.lgdd format) More... | |
virtual std::istream & | read_ascii (std::istream &in) |
update the current state of periodic boundary from an ascii file format *.lgdd More... | |
![]() | |
PeriodicBoundary () | |
constructor More... | |
virtual | ~PeriodicBoundary () |
destructor More... | |
void | make_periodic (Element &el) |
a function that transforms a normal element into a periodic master element with its related slaves More... | |
void | init_periodic_object () |
a function that initializes all the Periodic instances More... | |
void | retrieve_slave () |
void | clean_slave_element_without_master () |
std::function< Geom::Vector(const Geom::Vector &, bool &)> & | get_periodic_mv_function () |
get the move function More... | |
std::function< Geom::Vector(const Geom::Vector &)> & | get_follow_master_function (unsigned int rank) |
get the "follow master" More... | |
![]() | |
virtual | ~Base () |
size_t | numID () const |
size_t | uID () const |
void | set_numID (size_t val) |
void | clear_numID () |
Physic::Material & | get_mat () const |
void | set_mat (Physic::Material *) |
Base & | item () |
const Base & | item () const |
bool | is_same (const Base &) const |
template<class T > | |
T & | cast_to () |
template<class T > | |
const T & | cast_to () const |
template<class T > | |
bool | is () const |
virtual bool | is (size_t) const |
virtual const std::string & | get_ID () const |
virtual Base & | clone () |
template<class T > | |
T & | clone_to () |
virtual std::ostream & | export_to_povray (std::ostream &out) const |
Signal< Base & > & | deleted_signal () |
![]() | |
Null () | |
virtual | ~Null () |
![]() | |
Drawable () | |
virtual | ~Drawable () |
virtual void | draw_edge () |
virtual void | init_default_color () |
virtual std::ostream & | get_info (std::ostream &os) const |
virtual const Color & | default_color () const |
Color & | get_color () |
const Color & | get_color () const |
virtual void | set_color (const Color &) |
virtual void | set_alpha (float alpha) |
void | apply_color () const |
void | apply_edge_color () const |
void | apply_default_color () |
void | apply_selected_color () |
void | set_line_width (float) |
float | get_line_width () const |
float & | get_line_width () |
void | apply_line_width () const |
bool | is_visible () const |
void | set_visible (bool) |
void | paint () |
void | paint_edge () |
unsigned int | get_item_glkey () const |
![]() | |
Register () | |
virtual | ~Register () |
void | erase_from_all_setof () |
bool | belong_to_setof (const std::string &setOfId) const |
bool | belong_to_setof (const SetOf< Base > &set) const |
std::list< SetOf< Base > * > & | get_setof_list () |
unsigned long long int | get_numeric_ID () const |
![]() | |
PropClass () | |
virtual | ~PropClass () |
T & | new_object () |
T & | get () |
const T & | get () const |
bool | prop_exist () const |
void | add_prop (Core::Prop< PeriodicBoundary > *) |
void | remove_prop (Core::Prop< PeriodicBoundary > *) |
std::string | info () const |
![]() | |
Register () | |
virtual | ~Register () |
void | erase_from_all_setof () |
bool | belong_to_setof (const std::string &setOfId) const |
bool | belong_to_setof (const SetOf< PeriodicBoundary > &set) const |
std::list< SetOf< PeriodicBoundary > * > & | get_setof_list () |
unsigned long long int | get_numeric_ID () const |
![]() | |
PropClass () | |
virtual | ~PropClass () |
T & | new_object () |
T & | get () |
const T & | get () const |
bool | prop_exist () const |
void | add_prop (Core::Prop< Full3D > *) |
void | remove_prop (Core::Prop< Full3D > *) |
std::string | info () const |
![]() | |
Register () | |
virtual | ~Register () |
void | erase_from_all_setof () |
bool | belong_to_setof (const std::string &setOfId) const |
bool | belong_to_setof (const SetOf< Full3D > &set) const |
std::list< SetOf< Full3D > * > & | get_setof_list () |
unsigned long long int | get_numeric_ID () const |
Static Public Member Functions | |
static Full3D & | get () |
get the singleton instance of the periodic boundaries More... | |
![]() | |
static PeriodicBoundary & | get () |
get the singleton instance of the periodic boundaries More... | |
![]() | |
static Base & | get_by_numID (size_t) |
static void | clear_all_numID () |
static unsigned int | get_sub_class_number () |
![]() | |
static Drawable & | get_drawable_item_by_glkey (int) |
static void | set_draw_precision (unsigned int p) |
static void | increase_draw_precision () |
static void | decrease_draw_precision () |
static unsigned int | get_draw_precision () |
Private Member Functions | |
Full3D (const Full3D &)=delete | |
Full3D & | operator= (const Full3D &)=delete |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
complete serializing of the periodic boundary in the *.gdd format More... | |
Private Attributes | |
Geom::Vector | _a |
a vector, representing the length along x More... | |
Geom::Vector | _b |
a vector, representing the length along y More... | |
Geom::Vector | _c |
a vector, representing the length along z More... | |
Static Private Attributes | |
static Full3D * | _me = nullptr |
a pointer to the singleton More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
static Null | null = Null() |
![]() | |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
complete serializing of the FractureFacet in the *.gdd format More... | |
![]() | |
Base () | |
![]() | |
static unsigned int | affect_class_rank_ID () |
![]() | |
std::function< Geom::Vector(const Geom::Vector &, bool &)> | _periodic_mv_function |
a simple function for moving master elements from one boundary to another More... | |
std::vector< std::function< Geom::Vector(const Geom::Vector &)> > | _follow_master_function |
a list of simple functions for moving slave elements considering the master More... | |
![]() | |
std::vector< Core::Prop< PeriodicBoundary > * > | _prop |
![]() | |
std::vector< Core::Prop< Full3D > * > | _prop |
a singleton virtual class for representing periodic boundaries
This class represent a full 3D periodic boundary. It simply represents a box where each opposite faces periodic. The length and direction of the box are stored in three vectors _a, _b, and _c. Initially these vectors are perpendicular unit vector. The magnitude of these vectors can be changed to match the length of the box. In addition, the angle between vector (initially equal de 90 degree) can be changed to distort the domain.
GranOO3::DEM::Full3D::Full3D | ( | ) |
constructor
|
virtual |
destructor
|
privatedelete |
void GranOO3::DEM::Full3D::distort_on_x | ( | double | angle | ) |
distort the periodic domain along x
[in] | angle | : the angle value for distorting the domain |
This method apply a distorsion angle along x to the domain. Applying a distorsion angle lead to deform the periodic box to a configuration where the _b and _c are not perpendicular. After applying a distortion angle, the angle between _b and _c is 90° - angle
. This method can be used for applying pure shear in a periodic domain.
void GranOO3::DEM::Full3D::distort_on_y | ( | double | angle | ) |
distort the periodic domain along y
[in] | angle | : the angle value for distorting the domain |
This method apply a distorsion angle along y to the domain. Applying a distorsion angle lead to deform the periodic box to a configuration where the _a and _c are not perpendicular. After applying a distortion angle, the angle between _a and _c is 90° - angle
. This method can be used for applying pure shear in a periodic domain.
void GranOO3::DEM::Full3D::distort_on_z | ( | double | angle | ) |
distort the periodic domain along z
[in] | angle | : the angle value for distorting the domain |
This method apply a distorsion angle along z to the domain. Applying a distorsion angle lead to deform the periodic box to a configuration where the _a and _b are not perpendicular. After applying a distortion angle, the angle between _a and _b is 90° - angle
. This method can be used for applying pure shear in a periodic domain.
|
virtual |
a pure virtual function to draw the domain
This function is used by the granoo-viewer tool in order to visualize the periodic boundary.
Implements GranOO3::DEM::PeriodicBoundary.
|
static |
get the singleton instance of the periodic boundaries
double GranOO3::DEM::Full3D::get_lx | ( | ) | const |
get the length of the periodic box along x
This method return the norm of the _a vector
double GranOO3::DEM::Full3D::get_ly | ( | ) | const |
get the length of the periodic box along y
This method return the norm of the _b vector
double GranOO3::DEM::Full3D::get_lz | ( | ) | const |
get the length of the periodic box along z
This method return the norm of the _c vector
|
virtual |
get some info on the periodic bounday
Reimplemented from GranOO3::DEM::PeriodicBoundary.
|
virtual |
a function that must be triggered to initialize the periodic boundary
This function must be triggered in order to initialize the _follow_master_function of the base class PeriodicBoundary
Implements GranOO3::DEM::PeriodicBoundary.
|
virtual |
update the current state of periodic boundary from an ascii file format *.lgdd
[in] | is | : the stream where the data are read |
TODO, this feature is not yet implemented (only gdd file are supported)
Reimplemented from GranOO3::DEM::PeriodicBoundary.
void GranOO3::DEM::Full3D::scale_bounding_box | ( | double | factor | ) |
|
private |
void GranOO3::DEM::Full3D::set_bounding_box | ( | const Shape::Box & | box | ) |
void GranOO3::DEM::Full3D::set_bounding_box | ( | double | lx, |
double | ly, | ||
double | lz | ||
) |
void GranOO3::DEM::Full3D::set_length_on_x | ( | double | value | ) |
set the length of the periodic box along x
[in] | value | : the length value |
This method set the length along x, it simply set the norm of _a vector to the value
void GranOO3::DEM::Full3D::set_length_on_y | ( | double | value | ) |
set the length of the periodic box along y
[in] | value | : the length value |
This method set the length along y, it simply set the norm of _b vector to the value
void GranOO3::DEM::Full3D::set_length_on_z | ( | double | value | ) |
set the length of the periodic box along z
[in] | value | : the length value |
This method set the length along z, it simply set the norm of _c vector to the value
|
virtual |
dump the current state of the periodic boundary in a ascii file (standard *.lgdd format)
[in] | os | : the stream where the data will be written |
TODO, this feature is not yet implemented (only gdd file are supported)
Reimplemented from GranOO3::DEM::PeriodicBoundary.
|
friend |
|
private |
a vector, representing the length along x
The vector is initially along the global x axis. However, this direction could change a little bit if you apply a distorsion.
|
private |
a vector, representing the length along y
The vector is initially along the global y axis. However, this direction could change a little bit if you apply a distorsion.
|
private |
a vector, representing the length along z
The vector is initially along the global z axis. However, this direction could change a little bit if you apply a distorsion.
|
staticprivate |
a pointer to the singleton