![]() |
GranOO
3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
|
singleton class mainly used for IO More...
#include <Domain.hpp>
Public Member Functions | |
~Domain () | |
destructor, it does nothing particular More... | |
void | save (std::string) const |
save the current of the domain state in the specified file More... | |
void | load (std::string) |
load a domain from the specified file More... | |
void | save_ascii () const |
save the current of the domain state with ascii file format More... | |
void | save_ascii (std::string) const |
save the current of the domain state with ascii file format More... | |
void | load_ascii (std::string) |
load a domain from the specified file More... | |
void | save_roga () const |
void | save_roga (std::string) const |
void | load_roga (std::string) |
void | save_off (std::string) const |
save the current SupportShape More... | |
void | save_xyz (std::string set="Global") const |
save the current state of the domain in the *.xyz format More... | |
void | save_xyz (std::string, std::string set="Global") const |
save the current state of the domain in the *.xyz format More... | |
void | save_xyzr (std::string set="Global") const |
save the current state of the domain in the *.xyzr format More... | |
void | save_xyzr (std::string, std::string set="Global") const |
save the current state of the domain in the *.xyzr format More... | |
void | load_xyzr (std::string) |
load the current state of the domain More... | |
void | load_rxyz (std::string) |
load the current state of the domain More... | |
void | to_vtk (std::vector< std::pair< std::string, vtkSmartPointer< vtkUnstructuredGrid > > > &data, bool save_discrete_element_shape) |
utility method for saving the current state of the domain in vtk More... | |
void | read_sample_file (const std::string &fileName, const std::string &Id, const Geom::Frame &f, const std::string &prefix, const std::string &suffix, bool updateInitialParametersToCurrentParameters, bool clearKinematics, bool updateDiscreteShape) |
utility method for loading a sample file with a lot of option ! More... | |
![]() | |
void | clear () |
void | save () const |
void | save_light () const |
void | save_light (std::string) const |
void | load_light (std::string) |
void | export_to_povray () const |
void | export_to_povray (std::string) const |
std::ostream & | export_to_povray (std::ostream &out) const |
Private Member Functions | |
Domain () | |
constructor, it does nothing particular More... | |
Domain (const Domain &)=delete | |
Domain & | operator= (const Domain &)=delete |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
serialize the whole domain in the standard gdd format More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
static bool | exist () |
static Domain & | get () |
static void | instanciate () |
static void | delete_me () |
![]() | |
static std::string | std_file_extension () |
static std::string | light_file_extension () |
static std::string | ascii_file_extension () |
static std::string | povray_file_extension () |
static std::string | xyzr_file_extension () |
static std::string | rxyz_file_extension () |
static std::string | gfem_file_extension () |
static std::string | light_file_header () |
static std::string | roga_file_extension () |
![]() | |
SingletonB () | |
virtual | ~SingletonB () |
![]() | |
Singleton () | |
virtual | ~Singleton () |
![]() | |
Domain () | |
![]() | |
IOManager | _io |
std::string | _file_prefix |
![]() | |
static Domain * | _me |
singleton class mainly used for IO
|
virtual |
destructor, it does nothing particular
Reimplemented from GranOO3::Core::Domain.
|
private |
constructor, it does nothing particular
|
privatedelete |
|
virtual |
load a domain from the specified file
[in] | file | : file name |
The type of the file is automatically detected with the extension (*.gdd, *.agdd, etc.)
Reimplemented from GranOO3::Core::Domain.
void GranOO3::DEM::Domain::load_ascii | ( | std::string | file | ) |
load a domain from the specified file
[in] | file | : file name |
Here the expected type of file is *.agdd, see save_ascii()
void GranOO3::DEM::Domain::load_roga | ( | std::string | fileName | ) |
void GranOO3::DEM::Domain::load_rxyz | ( | std::string | file | ) |
load the current state of the domain
[in] | file | : the file name is the *.rxyz format |
Load the current state of the domain with the well-known-simple *.rxyz format
void GranOO3::DEM::Domain::load_xyzr | ( | std::string | file | ) |
load the current state of the domain
[in] | file | : the file name is the *.xyzr format |
Load the current state of the domain with the well-known-simple *.xyzr format
void GranOO3::DEM::Domain::read_sample_file | ( | const std::string & | fileName, |
const std::string & | setID, | ||
const Geom::Frame & | frame, | ||
const std::string & | prefix, | ||
const std::string & | suffix, | ||
bool | update, | ||
bool | clear, | ||
bool | support_shape | ||
) |
utility method for loading a sample file with a lot of option !
[in] | fileName | : the file name to load |
[in] | setID | : if not empty, build new SetOf and put the entire domain inside |
[in] | frame | : translate and rotate the sample file to the desired place |
[in] | prefix | : all the SetOf contained in the sample file will be prefixed by the specified prefix |
[in] | suffix | : all the SetOf contained in the sample file will be suffixed by the specified suffix |
[in] | update | : if true, the current state of the loaded domain will be considered as the initial state |
[in] | clear | : if true, the kinematics (velocity, acceleration) will be considered as zero |
[in] | support_shape | : if true, the associated support shape will be updated |
This method is mainly used for loading a sample file at the beginning of a simulation. It allows to change the orientation and the position of the sample, to consider these new positions as initial parameters and so on...
|
virtual |
save the current of the domain state in the specified file
[in] | file | : file name |
The type of the file is automatically detected with the extension (*.gdd, *.agdd, etc.)
Reimplemented from GranOO3::Core::Domain.
void GranOO3::DEM::Domain::save_ascii | ( | ) | const |
save the current of the domain state with ascii file format
The name of the file is automatically built with the current iteration number. Here, the standard granoo ascii file format (*.agdd) is chosen for saved the file. This simple format is dedicated to discrete domains with spherical elements. The advantage of this format is its compatibility between the different granoo version.
void GranOO3::DEM::Domain::save_ascii | ( | std::string | file | ) | const |
save the current of the domain state with ascii file format
[in] | file | : file name of the output file |
Same as save_ascii() (with a specified file)
void GranOO3::DEM::Domain::save_off | ( | std::string | file | ) | const |
save the current SupportShape
[in] | file | : file name of the output file |
This method is quite particular. It allows to save in the *.off format the main support shape (with a polyhedral shape) in the *.off format. Be aware, this method does not save the whole state of a domain !
void GranOO3::DEM::Domain::save_roga | ( | ) | const |
void GranOO3::DEM::Domain::save_roga | ( | std::string | fileName | ) | const |
void GranOO3::DEM::Domain::save_xyz | ( | std::string | set = "Global" | ) | const |
save the current state of the domain in the *.xyz format
[in] | set | : the set ID of the Element to save (default is the Global set) |
The name of the file is automatically built with the current iteration number. Here, the standard *.xyz is chosen for saved the file. This very very simple format is mainly dedicated to discrete domains with spherical elements. Its advantage is its compatibility between different simulation tools.
void GranOO3::DEM::Domain::save_xyz | ( | std::string | file, |
std::string | set = "Global" |
||
) | const |
void GranOO3::DEM::Domain::save_xyzr | ( | std::string | set = "Global" | ) | const |
save the current state of the domain in the *.xyzr format
[in] | set | : the set ID of the Element to save (default is the Global set) |
The name of the file is automatically built with the current iteration number. Here, the standard *.xyzr is chosen for saved the file. This very very simple format is mainly dedicated to discrete domains with spherical elements. Its advantage is its compatibility between different simulation tools.
void GranOO3::DEM::Domain::save_xyzr | ( | std::string | file, |
std::string | set = "Global" |
||
) | const |
|
inlineprivate |
serialize the whole domain in the standard gdd format
void GranOO3::DEM::Domain::to_vtk | ( | std::vector< std::pair< std::string, vtkSmartPointer< vtkUnstructuredGrid > > > & | data, |
bool | with_element_shape | ||
) |
utility method for saving the current state of the domain in vtk
[in] | data | : a vector of (key,pointer) that represents the data |
[in] | with_element_shape | : export also the element shape (mainly used for polyhedral elements) |
This method is used for paraview export
|
friend |