![]() |
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 <PeriodicBoundary.hpp>
Public Member Functions | |
PeriodicBoundary () | |
constructor More... | |
virtual | ~PeriodicBoundary () |
destructor More... | |
virtual void | init_function ()=0 |
a pure virtual function that must be overridden More... | |
virtual void | draw ()=0 |
a pure virtual function to draw the domain 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 () |
virtual std::string | info () const |
a util method to get some info More... | |
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 std::ostream & | write_ascii (std::ostream &out) const |
virtual std::istream & | read_ascii (std::istream &in) |
![]() | |
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 |
Static Public Member Functions | |
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 () |
Protected Member Functions | |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
complete serializing of the FractureFacet in the *.gdd format More... | |
![]() | |
Base () | |
Protected Attributes | |
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 |
Private Member Functions | |
PeriodicBoundary (const PeriodicBoundary &)=delete | |
PeriodicBoundary & | operator= (const PeriodicBoundary &)=delete |
Static Private Attributes | |
static PeriodicBoundary * | _me = nullptr |
a pointer to the singleton More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
static Null | null = Null() |
![]() | |
static unsigned int | affect_class_rank_ID () |
a singleton virtual class for representing periodic boundaries
This class is the main entry point for managing periodic boundaries with GranOO. When you manage periodic boundaries, you should consider "slave" and "master" elements. The master elements are the main elements which are inside the boundary whereas the slave elements are some kind of clones of the master elements. For example, within a Full3D periodic boundaries (using parallelepipedic domains) a single master element has 27 slave elements. A master element could interact with a slave element by contacts or bonds. When a master element crosses a boundary, he is immediately "teleported" to the other front boundary. Note that, slave elements have similar displacements, velocities, masses and so on, from their master elements. If you want to accede to master element and slave elements, you can retrieve them with the "Master" and "Slave" IDs SetOf
Note that this class is purely virtual. You can override this class to implement different kind of periodic boundaries. The available periodic boundaries are located into the PeriodicBoundary folder. Note that a property called Periodic is associated to Element in order to manage periodic boundaries.
GranOO3::DEM::PeriodicBoundary::PeriodicBoundary | ( | ) |
constructor
|
virtual |
destructor
|
privatedelete |
void GranOO3::DEM::PeriodicBoundary::clean_slave_element_without_master | ( | ) |
|
pure 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.
Reimplemented from GranOO3::Core::Drawable.
Implemented in GranOO3::DEM::Full3D.
|
static |
get the singleton instance of the periodic boundaries
|
inline |
get the "follow master"
[in] | the | rank of the wanted "follow master" function |
rank
rank
|
inline |
get the move function
|
virtual |
a util method to get some info
Reimplemented from GranOO3::Core::Base.
Reimplemented in GranOO3::DEM::Full3D.
|
pure virtual |
a pure virtual function that must be overridden
This function must be overridden in order to initialize the _follow_master_function
Implemented in GranOO3::DEM::Full3D.
void GranOO3::DEM::PeriodicBoundary::init_periodic_object | ( | ) |
a function that initializes all the Periodic instances
This method must be used once, just before running a periodic simulation. For instance, it is used in the initialization method of ApplyPeriodicCondition plugin.
void GranOO3::DEM::PeriodicBoundary::make_periodic | ( | Element & | el | ) |
a function that transforms a normal element into a periodic master element with its related slaves
[in] | el | : a regular element to transform into a periodic one |
This method does the following things :
el
element into a master elementel
element (making slave elements)
|
privatedelete |
|
virtual |
Reimplemented from GranOO3::Core::Base.
Reimplemented in GranOO3::DEM::Full3D.
void GranOO3::DEM::PeriodicBoundary::retrieve_slave | ( | ) |
|
protected |
|
virtual |
Reimplemented from GranOO3::Core::Base.
Reimplemented in GranOO3::DEM::Full3D.
|
friend |
|
protected |
a list of simple functions for moving slave elements considering the master
This vector contains a list of function which are used for moving the slave elements. Here, a list must be used as several slaves are considered for a single master element. For instance, for the Full3D periodic condition, 27 functions (one per slave) must be present. Each of these functions are passed to the Periodic property and are is mainly used by the Periodic::follow_master_motion() method which is called by the ApplyPeriodicCondition plugin.
Each of these functions takes a Geom::Vector as input which corresponds to the current position of the master element and returns the position of the considered slave element.
|
staticprivate |
a pointer to the singleton
|
protected |
a simple function for moving master elements from one boundary to another
This function is used to move a master element from one boundary to another one (also called teleportation). In fact, this function is passed to the Periodic property is mainly used by the Periodic::teleport_master() method which is called by the ApplyPeriodicCondition plugin.
For now, this teleportation feature is just activated for pure granular simulation without bonds. Managing bonds with teleportation is not yet supported. However, it is not really problem as bonded domains represent continuum domain where teleportation is not expected.
This _periodic_mv_function function :