NDDEM
|
Generic class to handle the simulation set up. More...
#include <Parameters.h>
Public Member Functions | |
Parameters () | |
Parameters (int NN) | |
Set the default values for all parameters. Calls to setup parameter function should be provided after initialisation of this class. More... | |
void | reset_ND (int NN) |
reset the full simulation. More... | |
template<class Archive > | |
void | serialize (Archive &ar) |
int | set_boundaries () |
Set default boundaries. More... | |
void | perform_PBC (v1d &X, uint32_t &PBCFlags) |
Bring particle back in the simulation box if the grains cross the boundaries. More... | |
void | perform_PBCLE_move () |
void | perform_PBCLE (v1d &X, v1d &V, uint32_t &PBCFlag) |
bool | perform_forceinsphere (v1d &X) |
void | perform_MOVINGWALL () |
Move the boundary wall if moving. More... | |
int | init_mass () |
Initialise particle mass. More... | |
int | init_inertia () |
Initialise particle moment of inertia. More... | |
void | do_nothing (double time __attribute__((unused))) |
void | do_gravityrotate (double deltatime) |
void | load_datafile (char path[], v2d &X, v2d &V, v2d &Omega) |
Load and parse input script. More... | |
void | check_events (float time, v2d &X, v2d &V, v2d &Omega) |
Verify if an event triggers at the current time time. More... | |
void | interpret_command (istream &in, v2d &X, v2d &V, v2d &Omega) |
Parse input script commands. More... | |
void | interpret_command (string &in, v2d &X, v2d &V, v2d &Omega) |
Parse input script commands. More... | |
void | remove_particle (int idx, v2d &X, v2d &V, v2d &A, v2d &Omega, v2d &F, v2d &FOld, v2d &Torque, v2d &TorqueOld) |
Not tested. More... | |
void | add_particle () |
Not implemented. More... | |
void | init_locations (char *line, v2d &X, char *extras) |
Set particle locations. More... | |
void | init_radii (char line[], v1d &r) |
Set particle radii. More... | |
void | display_info (int tint, v2d &V, v2d &Omega, v2d &F, v2d &Torque, int, int) |
On screen information display. More... | |
void | quit_cleanly () |
Close opened dump files in the event of an emergency quit (usually a SIGINT signal to the process) More... | |
void | finalise () |
Close opened dump files. More... | |
void | xml_header () |
Write the Xml header (should go into a file dedicated to the writing though ...) More... | |
int | dumphandling (int ti, double t, v2d &X, v2d &V, v1d &Vmag, v2d &A, v2d &Omega, v1d &OmegaMag, vector< uint32_t > &PBCFlags, v1d &Z, Multiproc< d > &MP) |
Dump writing functions. More... | |
int | savecsvcontact (FILE *out, ExportData outflags, Multiproc< d > &MP, cv2d &X) |
Public Attributes | |
int | N |
Number of particles. More... | |
int | tdump |
Write dump file every this many timesteps. More... | |
int | tinfo |
Show detail information on scren every this many timesteps. More... | |
double | T |
Run until this time (note it is a floating point). More... | |
double | dt |
timestep More... | |
double | rho |
density More... | |
double | Kn |
Normal spring constant. More... | |
double | Kt |
Tangential spring constant. More... | |
double | Gamman |
Normal dissipation. More... | |
double | Gammat |
Tangential dissipation. More... | |
double | Mu |
Fricton. More... | |
double | Mu_wall |
double | damping |
bool | forceinsphere |
double | cellsize |
Size of cells for contact detection. More... | |
ContactModels | ContactModel =HOOKE |
Model of interparticle contact. More... | |
ContactStrategies | contact_strategy = NAIVE |
Strategy for the contact detection. More... | |
vector< std::pair< ExportType, ExportData > > | dumps |
Vector linking dump file and data dumped. More... | |
vector< double > | r |
Particle radii. More... | |
vector< double > | m |
Particle mass. More... | |
vector< double > | I |
Particule moment of inertia. More... | |
vector< double > | g |
Gravity vector. More... | |
vector< bool > | Frozen |
Frozen atom if true. More... | |
vector< Boundary< d > > | Boundaries |
List of boundaries. Second dimension is {min, max, length, type}. More... | |
string | Directory |
Saving directory. More... | |
bool | orientationtracking |
Track orientation? More... | |
bool | wallforcecompute |
Compute for on the wall? More... | |
bool | wallforcerequested |
Compute for on the wall? More... | |
bool | wallforcecomputed |
Compute for on the wall? More... | |
double | graddesc_gamma |
Decay rate parameters for the gradient descent algorithm. More... | |
double | graddesc_tol |
Tolerance for the gradient descent algorithm. More... | |
bool | contactforcedump |
Extract the forces between grains as well? More... | |
unsigned long int | seed = 5489UL |
Seed for the boost RNG. Initialised with the default seed of the Mersenne twister in Boost. More... | |
double | gravityrotateangle = 0.0 |
RigidBodies_< d > | RigidBodies |
Handle all the rigid bodies. More... | |
vector< Mesh< d > > | Meshes |
Handle all meshes. More... | |
int | n_restart =-1 |
Restart writing frequency. More... | |
std::string | restart_filename ="" |
Restart filename. More... | |
unsigned char | restart_flag |
multimap< float, string > | events |
For storing events. first is the time at which the event triggers, second is the event command string, parsed on the fly when the event gets triggered. More... | |
double | grav_intensity = 10 |
double | grav_omega =1 |
int | grav_rotdim [2] ={0,1} |
void(Parameters::* | update_gravity )(double time) = &Parameters::do_nothing |
XMLWriter * | xmlout |
Generic class to handle the simulation set up.
|
inline |
|
inline |
Set the default values for all parameters. Calls to setup parameter function should be provided after initialisation of this class.
void Parameters< d >::add_particle |
Not implemented.
void Parameters< d >::check_events | ( | float | time, |
v2d & | X, | ||
v2d & | V, | ||
v2d & | Omega | ||
) |
Verify if an event triggers at the current time time.
void Parameters< d >::display_info | ( | int | tint, |
v2d & | V, | ||
v2d & | Omega, | ||
v2d & | F, | ||
v2d & | Torque, | ||
int | nct, | ||
int | ngst | ||
) |
On screen information display.
|
inline |
|
inline |
int Parameters< d >::dumphandling | ( | int | ti, |
double | t, | ||
v2d & | X, | ||
v2d & | V, | ||
v1d & | Vmag, | ||
v2d & | A, | ||
v2d & | Omega, | ||
v1d & | OmegaMag, | ||
vector< uint32_t > & | PBCFlags, | ||
v1d & | Z, | ||
Multiproc< d > & | MP | ||
) |
Dump writing functions.
void Parameters< d >::finalise |
Close opened dump files.
int Parameters< d >::init_inertia |
Initialise particle moment of inertia.
void Parameters< d >::init_locations | ( | char * | line, |
v2d & | X, | ||
char * | extras | ||
) |
Set particle locations.
int Parameters< d >::init_mass |
Initialise particle mass.
void Parameters< d >::init_radii | ( | char | line[], |
v1d & | r | ||
) |
Set particle radii.
void Parameters< d >::interpret_command | ( | istream & | in, |
v2d & | X, | ||
v2d & | V, | ||
v2d & | Omega | ||
) |
Parse input script commands.
void Parameters< d >::interpret_command | ( | string & | in, |
v2d & | X, | ||
v2d & | V, | ||
v2d & | Omega | ||
) |
Parse input script commands.
void Parameters< d >::load_datafile | ( | char | path[], |
v2d & | X, | ||
v2d & | V, | ||
v2d & | Omega | ||
) |
Load and parse input script.
|
inline |
void Parameters< d >::perform_MOVINGWALL |
Move the boundary wall if moving.
void Parameters< d >::perform_PBC | ( | v1d & | X, |
uint32_t & | PBCFlags | ||
) |
Bring particle back in the simulation box if the grains cross the boundaries.
void Parameters< d >::perform_PBCLE | ( | v1d & | X, |
v1d & | V, | ||
uint32_t & | PBCFlag | ||
) |
void Parameters< d >::perform_PBCLE_move |
void Parameters< d >::quit_cleanly |
Close opened dump files in the event of an emergency quit (usually a SIGINT signal to the process)
void Parameters< d >::remove_particle | ( | int | idx, |
v2d & | X, | ||
v2d & | V, | ||
v2d & | A, | ||
v2d & | Omega, | ||
v2d & | F, | ||
v2d & | FOld, | ||
v2d & | Torque, | ||
v2d & | TorqueOld | ||
) |
Not tested.
|
inline |
reset the full simulation.
|
inline |
int Parameters< d >::set_boundaries |
Set default boundaries.
Some Infos on set_boundaries.
void Parameters< d >::xml_header |
Write the Xml header (should go into a file dedicated to the writing though ...)
vector< Boundary<d> > Parameters< d >::Boundaries |
List of boundaries. Second dimension is {min, max, length, type}.
double Parameters< d >::cellsize |
Size of cells for contact detection.
ContactStrategies Parameters< d >::contact_strategy = NAIVE |
Strategy for the contact detection.
bool Parameters< d >::contactforcedump |
Extract the forces between grains as well?
ContactModels Parameters< d >::ContactModel =HOOKE |
Model of interparticle contact.
double Parameters< d >::damping |
string Parameters< d >::Directory |
Saving directory.
double Parameters< d >::dt |
timestep
vector<std::pair<ExportType,ExportData> > Parameters< d >::dumps |
Vector linking dump file and data dumped.
multimap<float, string> Parameters< d >::events |
For storing events. first is the time at which the event triggers, second is the event command string, parsed on the fly when the event gets triggered.
bool Parameters< d >::forceinsphere |
vector<bool> Parameters< d >::Frozen |
Frozen atom if true.
vector<double> Parameters< d >::g |
Gravity vector.
double Parameters< d >::Gamman |
Normal dissipation.
double Parameters< d >::Gammat |
Tangential dissipation.
double Parameters< d >::graddesc_gamma |
Decay rate parameters for the gradient descent algorithm.
double Parameters< d >::graddesc_tol |
Tolerance for the gradient descent algorithm.
double Parameters< d >::grav_intensity = 10 |
double Parameters< d >::grav_omega =1 |
int Parameters< d >::grav_rotdim[2] ={0,1} |
double Parameters< d >::gravityrotateangle = 0.0 |
vector<double> Parameters< d >::I |
Particule moment of inertia.
double Parameters< d >::Kn |
Normal spring constant.
double Parameters< d >::Kt |
Tangential spring constant.
vector<double> Parameters< d >::m |
Particle mass.
vector<Mesh<d> > Parameters< d >::Meshes |
Handle all meshes.
double Parameters< d >::Mu |
Fricton.
double Parameters< d >::Mu_wall |
int Parameters< d >::N |
Number of particles.
int Parameters< d >::n_restart =-1 |
Restart writing frequency.
bool Parameters< d >::orientationtracking |
Track orientation?
vector<double> Parameters< d >::r |
Particle radii.
std::string Parameters< d >::restart_filename ="" |
Restart filename.
unsigned char Parameters< d >::restart_flag |
double Parameters< d >::rho |
density
RigidBodies_<d> Parameters< d >::RigidBodies |
Handle all the rigid bodies.
unsigned long int Parameters< d >::seed = 5489UL |
Seed for the boost RNG. Initialised with the default seed of the Mersenne twister in Boost.
double Parameters< d >::T |
Run until this time (note it is a floating point).
int Parameters< d >::tdump |
Write dump file every this many timesteps.
int Parameters< d >::tinfo |
Show detail information on scren every this many timesteps.
void(Parameters::* Parameters< d >::update_gravity) (double time) = &Parameters::do_nothing |
bool Parameters< d >::wallforcecompute |
Compute for on the wall?
bool Parameters< d >::wallforcecomputed |
Compute for on the wall?
bool Parameters< d >::wallforcerequested |
Compute for on the wall?
XMLWriter* Parameters< d >::xmlout |