MercuryDPM
0.10
|
A class that defines and solves a MD problem. More...
#include <MD.h>
Public Member Functions | |
void | constructor () |
A public constructor, which sets defaults so the problem can be solved off the shelf. More... | |
MD () | |
MD (STD_save &other) | |
virtual | ~MD () |
void | info () |
Set up a virtual info this will be provided from the inhertiance. More... | |
void | solve () |
The work horse of the code. More... | |
void | solve (unsigned int argc, char *argv[]) |
Read arguments before solving. More... | |
void | solveWithMDCLR () |
Tries to solve the problem using MDCLR. More... | |
Mdouble | get_t () |
Access function for the time. More... | |
void | set_t (Mdouble new_t) |
Access function for the time. More... | |
int | get_NSpecies () |
Allows the number of Species to be accessed. More... | |
std::vector< CSpecies > & | get_Species (void) |
Allows the species to be copied. More... | |
CSpecies * | get_Species (int i) |
Allows the species to be accessed. More... | |
CSpecies * | get_MixedSpecies (int i, int j) |
Allows the mixed species to be accessed. More... | |
void | set_MixedSpecies (int i, int j, CSpecies &S) |
Allows the mixed species to be set. More... | |
void | set_tmax (Mdouble new_tmax) |
Allows the upper time limit to be changed. More... | |
Mdouble | get_tmax () |
Allows the upper time limit to be accessed. More... | |
ParticleHandler & | getParticleHandler () |
WallHandler & | getWallHandler () |
BoundaryHandler & | getBoundaryHandler () |
void | set_savecount (int new_) |
Allows the number of time steps between saves to be changed, see also set_number_of_saves. More... | |
void | set_save_count_all (int new_) |
void | set_save_count_data (int new_) |
void | set_save_count_ene (int new_) |
void | set_save_count_stat (int new_) |
void | set_save_count_fstat (int new_) |
int | get_savecount () |
Allows the number of time steps between saves to be accessed. More... | |
int | get_save_count () |
int | get_save_count_data () |
int | get_save_count_ene () |
int | get_save_count_stat () |
int | get_save_count_fstat () |
void | set_do_stat_always (bool new_) |
Sets how often the data is saved using the number of saves wanted, tmax, and dt. See also set_savecount. More... | |
void | set_number_of_saves (Mdouble N) |
void | set_number_of_saves_all (Mdouble N) |
void | set_number_of_saves_data (Mdouble N) |
void | set_number_of_saves_ene (Mdouble N) |
void | set_number_of_saves_stat (Mdouble N) |
void | set_number_of_saves_fstat (Mdouble N) |
void | set_plastic_k1_k2max_kc_depth (Mdouble k1_, Mdouble k2max_, Mdouble kc_, Mdouble depth_, unsigned int indSpecies=0) |
Allows the plastic constants to be changed. More... | |
void | set_k1 (Mdouble new_, unsigned int indSpecies=0) |
void | set_k2max (Mdouble new_, unsigned int indSpecies=0) |
void | set_kc (Mdouble new_, unsigned int indSpecies=0) |
void | set_depth (Mdouble new_, unsigned int indSpecies=0) |
Mdouble | get_k1 (unsigned int indSpecies=0) |
Allows the plastic constants to be accessed. More... | |
Mdouble | get_k2max (unsigned int indSpecies=0) |
Mdouble | get_kc (unsigned int indSpecies=0) |
Mdouble | get_depth (unsigned int indSpecies=0) |
Mdouble | get_plastic_dt (Mdouble mass, unsigned int indSpecies=0) |
void | set_k (Mdouble new_, unsigned int indSpecies=0) |
Allows the spring constant to be changed. More... | |
Mdouble | get_k (int indSpecies=0) |
Allows the spring constant to be accessed. More... | |
void | set_kt (Mdouble new_, unsigned int indSpecies=0) |
Allows the spring constant to be changed. More... | |
Mdouble | get_kt (int indSpecies=0) |
Allows the spring constant to be accessed. More... | |
void | set_krolling (Mdouble new_, unsigned int indSpecies=0) |
Allows the spring constant to be changed. More... | |
Mdouble | get_krolling (int indSpecies=0) |
Allows the spring constant to be accessed. More... | |
void | set_ktorsion (Mdouble new_, unsigned int indSpecies=0) |
Allows the spring constant to be changed. More... | |
Mdouble | get_ktorsion (int indSpecies=0) |
Allows the spring constant to be accessed. More... | |
void | set_rho (Mdouble new_, unsigned int indSpecies=0) |
Allows the density to be changed. More... | |
Mdouble | get_rho (int indSpecies=0) |
Allows the density to be accessed. More... | |
void | set_dispt (Mdouble new_, unsigned int indSpecies=0) |
Allows the tangential viscosity to be changed. More... | |
Mdouble | get_dispt (unsigned int indSpecies=0) |
Allows the tangential viscosity to be accessed. More... | |
void | set_disprolling (Mdouble new_, unsigned int indSpecies=0) |
Allows the tangential viscosity to be changed. More... | |
Mdouble | get_disprolling (unsigned int indSpecies=0) |
Allows the tangential viscosity to be accessed. More... | |
void | set_disptorsion (Mdouble new_, unsigned int indSpecies=0) |
Allows the tangential viscosity to be changed. More... | |
Mdouble | get_disptorsion (unsigned int indSpecies=0) |
Allows the tangential viscosity to be accessed. More... | |
void | set_disp (Mdouble new_, unsigned int indSpecies=0) |
Allows the normal dissipation to be changed. More... | |
Mdouble | get_disp (unsigned int indSpecies=0) |
Allows the normal dissipation to be accessed. More... | |
void | set_dissipation (Mdouble new_, unsigned int indSpecies=0) |
Allows the normal dissipation to be changed. More... | |
Mdouble | get_dissipation (unsigned int indSpecies=0) |
Allows the normal dissipation to be accessed. More... | |
void | set_mu (Mdouble new_, unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be changed. More... | |
Mdouble | get_mu (unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be accessed. More... | |
void | set_murolling (Mdouble new_, unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be changed. More... | |
Mdouble | get_murolling (unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be accessed. More... | |
void | set_mutorsion (Mdouble new_, unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be changed. More... | |
Mdouble | get_mutorsion (unsigned int indSpecies=0) |
Allows the Coulomb friction coefficient to be accessed. More... | |
void | set_rotation (bool new_) |
bool | get_rotation () |
void | set_dim_particle (int new_, unsigned int indSpecies=0) |
Allows the dimension of the particle (f.e. for mass) to be changed. More... | |
int | get_dim_particle (unsigned int indSpecies=0) |
Allows the dimension of the particle (f.e. for mass) to be accessed. More... | |
bool | get_save_data_data () |
Returns the data counter. More... | |
bool | get_save_data_ene () |
bool | get_save_data_fstat () |
bool | get_save_data_stat () |
bool | get_do_stat_always () |
void | set_k_and_restitution_coefficient (Mdouble k_, Mdouble eps, Mdouble mass, unsigned int indSpecies=0) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P. More... | |
void | set_collision_time_and_restitution_coefficient (Mdouble tc, Mdouble eps, Mdouble mass, unsigned int indSpecies=0) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P. More... | |
void | set_collision_time_and_restitution_coefficient (Mdouble tc, Mdouble eps, Mdouble mass1, Mdouble mass2, unsigned int indSpecies=0) |
Set k, disp such that is matches a given tc and eps for a collision of two different masses. More... | |
void | set_collision_time_and_normal_and_tangential_restitution_coefficient (Mdouble tc, Mdouble eps, Mdouble beta, Mdouble mass1, Mdouble mass2, unsigned int indSpecies=0) |
See CSpecies::set_collision_time_and_normal_and_tangential_restitution_coefficient. More... | |
void | set_collision_time_and_normal_and_tangential_restitution_coefficient_nodispt (Mdouble tc, Mdouble eps, Mdouble beta, Mdouble mass1, Mdouble mass2, unsigned int indSpecies=0) |
See CSpecies::set_collision_time_and_normal_and_tangential_restitution_coefficient. More... | |
Mdouble | get_collision_time (Mdouble mass, unsigned int indSpecies=0) |
Calculates collision time for two copies of a particle of given disp, k, mass. More... | |
Mdouble | get_restitution_coefficient (Mdouble mass, unsigned int indSpecies=0) |
Calculates restitution coefficient for two copies of given disp, k, mass. More... | |
Mdouble | get_xmin () |
Get xmin. More... | |
Mdouble | get_xmax () |
Get xmax. More... | |
Mdouble | get_ymin () |
Gets ymin. More... | |
Mdouble | get_ymax () |
Gets ymax. More... | |
Mdouble | get_zmin () |
Gets zmin. More... | |
Mdouble | get_zmax () |
Gets zmax. More... | |
void | set_xmin (Mdouble new_xmin) |
Sets xmin and walls, assuming the standard definition of walls as in the default constructor. More... | |
void | set_ymin (Mdouble new_ymin) |
void | set_zmin (Mdouble new_zmin) |
Sets ymin and walls, assuming the standard definition of walls as in the default constructor. More... | |
void | set_xmax (Mdouble new_xmax) |
Sets xmax and walls, assuming the standard definition of walls as in the default constructor. More... | |
void | set_ymax (Mdouble new_ymax) |
Sets ymax and walls, assuming the standard definition of walls as in the default constructor. More... | |
void | set_zmax (Mdouble new_zmax) |
Sets ymax and walls, assuming the standard definition of walls as in the default constructor. More... | |
void | set_dt (Mdouble new_dt) |
Allows the time step dt to be changed. More... | |
Mdouble | get_dt () |
Allows the time step dt to be accessed. More... | |
void | set_name (const char *name) |
Sets the name of the problem, used for the same data files. More... | |
void | set_xballs_colour_mode (int new_cmode) |
Set the xball output mode. More... | |
void | set_xballs_cmode (int new_cmode) |
int | get_xballs_cmode () |
void | set_xballs_vector_scale (double new_vscale) |
Set the scale of vectors in xballs. More... | |
double | get_xballs_vscale () |
void | set_xballs_additional_arguments (std::string new_) |
Set the additional arguments for xballs. More... | |
std::string | get_xballs_additional_arguments () |
void | set_xballs_scale (Mdouble new_scale) |
Set the scale of the xballs problem. The default is fit to screen. More... | |
double | get_xballs_scale () |
void | set_gravity (Vec3D new_gravity) |
Allows the gravitational acceleration to be changed. More... | |
Vec3D | get_gravity () |
Allows the gravitational acceleration to be accessed. More... | |
void | set_dim (int new_dim) |
Allows the dimension of the simulation to be changed. More... | |
int | get_dim () |
Allows the dimension of the simulation to be accessed. More... | |
int | get_restart_version () |
Gets restart_version. More... | |
void | set_restart_version (int new_) |
Sets restart_version. More... | |
bool | get_restarted () |
Gets restarted. More... | |
Mdouble | get_max_radius () |
Sets restarted. More... | |
void | set_restarted (bool new_) |
bool | get_append () |
Gets restarted. More... | |
void | set_append (bool new_) |
Sets restarted. More... | |
Mdouble | get_ene_ela () |
Gets ene_ela. More... | |
void | set_ene_ela (Mdouble new_) |
Sets ene_ela. More... | |
void | add_ene_ela (Mdouble new_) |
Sets ene_ela. More... | |
void | Remove_Particle (int IP) |
This function removes partice IP from the vector of particles by moving the last particle in the vector to the position if IP Also it checks if the moved Particle has any tangentialsspring-information, which needs to be moved to a different particle, because tangential spring information always needs to be stored in the real particle with highest particle index. More... | |
Mdouble | get_Mass_from_Radius (Mdouble radius, int indSpecies=0) |
Mdouble | get_maximum_velocity (BaseParticle &P) |
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other) More... | |
virtual BaseParticle * | getSmallestParticle () |
virtual BaseParticle * | getLargestParticle () |
virtual void | removeParticle (int iP) |
Mdouble | get_maximum_velocity () |
void | set_dt_by_mass (Mdouble mass) |
Sets dt to 1/50-th of the collision time for two particles of mass P. More... | |
void | set_dt (BaseParticle &P) |
Sets dt to 1/50-th of the collision time for two copies of P. More... | |
void | set_dt () |
Sets dt to 1/50-th of the smallest possible collision time. More... | |
virtual void | setup_particles_initial_conditions () |
This function allows the initial conditions of the particles to be set, by default locations is random. More... | |
virtual void | create_xballs_script () |
This creates a scipt which can be used to load the xballs problem to display the data just generated. More... | |
virtual double | getInfo (BaseParticle &P) |
Allows the user to set what is written into the info column in the data file. By default is store the Species ID number. More... | |
virtual void | save_restart_data () |
Stores all MD data. More... | |
int | load_restart_data () |
Loads all MD data. More... | |
int | load_restart_data (std::string filename) |
void | statistics_from_restart_data (const char *name) |
Loads all MD data and plots statistics for all timesteps in the .data file. More... | |
virtual void | write (std::ostream &os) |
Writes all MD data. More... | |
virtual void | read (std::istream &is) |
Reads all MD data. More... | |
virtual void | write_v1 (std::ostream &os) |
Writes all MD data. More... | |
virtual void | read_v1 (std::istream &is) |
Reads all MD data. More... | |
virtual void | read_v2 (std::istream &is) |
bool | load_from_data_file (const char *filename, unsigned int format=0) |
This allows particle data to be reloaded from data files. More... | |
bool | load_par_ini_file (const char *filename) |
allows the user to read par.ini files (useful to read MDCLR files) More... | |
bool | read_next_from_data_file (unsigned int format=0) |
by default format do not pass an argument; only specify format if you have to read a special format (f.e. dim=2, but format=14 (3d format)) More... | |
int | read_dim_from_data_file () |
bool | find_next_data_file (Mdouble tmin, bool verbose=true) |
virtual void | print (std::ostream &os, bool print_all=false) |
Outputs MD. More... | |
void | add_Species (CSpecies &S) |
void | add_Species (void) |
void | set_format (int new_) |
int | get_format () |
int | readArguments (unsigned int argc, char *argv[]) |
Can interpret main function input arguments that are passed by the driver codes. More... | |
virtual int | readNextArgument (unsigned int &i, unsigned int argc, char *argv[]) |
![]() | |
STD_save () | |
Default constructor: sets the counter to 0 (i.e. no number will be included). More... | |
STD_save (STD_save &other) | |
Copy constructor. More... | |
void | constructor () |
void | inc_counter_in_file () |
Increament the counter value stored in the file_counter by 1 and store the new value. More... | |
int | read_run_num_from_file () |
Read rom the counter file the counter. More... | |
void | set_counter_from_file () |
Sets the counter based on the current number stored in the counter file. More... | |
void | save_info_to_disk () |
Saves the information generated by info to disk in a file. More... | |
void | set_counter (int new_counter) |
This set the counter, overriding the defaults. More... | |
int | get_counter () |
This returns the current value of the counter. More... | |
bool | FileExists (std::string strFilename) |
Function to check if a file exists, is used to check if a run has already need done. More... | |
void | auto_number () |
std::vector< int > | get_numbers (int size_x, int size_y) |
This turns a counter into two indexs for doing parmater studies. The indexs run from 1:size_x and 1:size_y where as the study number starts at 0. More... | |
int | launch_new (const char *name, bool quick=false) |
This launch a code from within this code. Please pass the name of the code to run. More... | |
void | set_name (const char *name) |
Sets the name of the problem, used for the same data files. More... | |
std::string | get_name () |
Allows the problem_name to be accessed. More... | |
std::fstream & | get_data_file () |
Allows the problem_name to be accessed. More... | |
std::fstream & | get_stat_file () |
Allows the problem_name to be accessed. More... | |
std::fstream & | get_fstat_file () |
Allows the problem_name to be accessed. More... | |
std::fstream & | get_ene_file () |
Allows the problem_name to be accessed. More... | |
void | set_fstat_filename (std::string filename) |
void | set_data_filename (std::string filename) |
void | set_stat_filename (std::string filename) |
void | set_ene_filename (std::string filename) |
void | set_fstat_filename () |
void | set_data_filename () |
void | set_stat_filename () |
void | set_ene_filename () |
std::string | get_fstat_filename () |
std::string | get_data_filename () |
std::string | get_stat_filename () |
std::string | get_ene_filename () |
void | set_step_size (unsigned int new_) |
unsigned int | get_step_size () |
void | set_options_fstat (unsigned int new_) |
set and get for file options More... | |
unsigned int | get_options_fstat (void) |
void | set_options_data (unsigned int new_) |
unsigned int | get_options_data (void) |
void | set_options_stat (unsigned int new_) |
unsigned int | get_options_stat (void) |
void | set_options_restart (unsigned int new_) |
unsigned int | get_options_restart (void) |
void | set_options_ene (unsigned int new_) |
unsigned int | get_options_ene (void) |
bool | open_file (std::fstream &file, std::string filename, unsigned int options, std::fstream::openmode mode) |
bool | open_fstat_file (std::fstream::openmode mode=std::fstream::out) |
bool | open_data_file (std::fstream::openmode mode=std::fstream::out) |
bool | open_stat_file (std::fstream::openmode mode=std::fstream::out) |
bool | open_ene_file (std::fstream::openmode mode=std::fstream::out) |
bool | open_counted_file (std::fstream &file, std::string filenameNoCount, std::fstream::openmode mode) |
opens file needed if data is written in multiple files More... | |
bool | increase_counter_fstat (std::fstream::openmode mode) |
bool | increase_counter_data (std::fstream::openmode mode) |
bool | increase_counter_stat (std::fstream::openmode mode) |
bool | increase_counter_ene (std::fstream::openmode mode) |
void | set_file_counter (int new_) |
int | get_file_counter () |
Public Attributes | |
RNG | random |
Protected Member Functions | |
virtual void | compute_all_forces () |
This does the force computation. More... | |
virtual void | compute_internal_forces (BaseParticle *i) |
Computes the forces between particles (internal in the sence that the sum over all these forces is zero i.e. fully modelled forces) More... | |
CTangentialSpring * | getTangentialSpring (BaseParticle *PI, BaseParticle *PJ, BaseParticle *PJreal) |
CTangentialSpring * | getTangentialSpringWall (BaseParticle *pI, int w) |
virtual void | compute_internal_forces (BaseParticle *P1, BaseParticle *P2) |
Computes the forces between particles (internal in the sence that the sum over all these forces is zero i.e. fully modelled forces) More... | |
void | compute_plastic_internal_forces (BaseParticle *P1, BaseParticle *P2) |
Computes plastic forces between particles. More... | |
virtual void | compute_external_forces (BaseParticle *PI) |
This is were the computation of external forces takes place (e.g. gravity) More... | |
virtual void | compute_walls (BaseParticle *PI) |
This is were the walls are. More... | |
Mdouble | computeShortRangeForceWithWall (BaseParticle *pI, int wall, CSpecies *pSpecies, Mdouble dist) |
Mdouble | computeShortRangeForceWithParticle (BaseParticle *PI, BaseParticle *PJ, BaseParticle *PJreal, CSpecies *pSpecies, Mdouble dist) |
virtual void | actions_before_time_loop () |
This is actions before the start of the main time loop. More... | |
virtual void | HGRID_actions_before_time_loop () |
This is actions before the start of the main time loop. More... | |
virtual void | HGRID_actions_before_time_step () |
This is action before the time step is started. More... | |
virtual void | HGRID_InsertParticleToHgrid (BaseParticle *obj UNUSED) |
This is action before the time step is started. More... | |
virtual void | HGRID_UpdateParticleInHgrid (BaseParticle *obj UNUSED) |
virtual void | HGRID_RemoveParticleFromHgrid (BaseParticle *obj UNUSED) |
virtual bool | get_HGRID_UpdateEachTimeStep () |
virtual void | actions_before_time_step () |
This is action before the time step is started. More... | |
virtual void | actions_after_solve () |
This is actions at the end of the code, but before the files are closed. More... | |
virtual void | actions_after_time_step () |
This is action after the time step is finished. More... | |
virtual void | output_xballs_data () |
Output xball data for Particle i. More... | |
virtual void | output_xballs_data_particle (int i) |
This function outputs the location and velocity of the particle in a format the xballs progream can read. More... | |
virtual void | start_ene () |
Functions for ene file. More... | |
virtual void | fstat_header () |
virtual void | output_ene () |
This function outputs statistical data - The default is to compute the rotational kinetic engergy, linear kinetic energy, and the centre of mass. More... | |
virtual void | initialize_statistics () |
Functions for statistics. More... | |
virtual void | output_statistics () |
virtual void | gather_statistics_collision (int index1 UNUSED, int index2 UNUSED, Vec3D Contact UNUSED, Mdouble delta UNUSED, Mdouble ctheta UNUSED, Mdouble fdotn UNUSED, Mdouble fdott UNUSED, Vec3D P1_P2_normal_ UNUSED, Vec3D P1_P2_tangential UNUSED) |
virtual void | process_statistics (bool usethese UNUSED) |
virtual void | finish_statistics () |
virtual void | set_initial_pressures_for_pressure_controlled_walls () |
virtual void | do_integration_before_force_computation (BaseParticle *pI) |
This is were the integration is done. More... | |
virtual void | checkInteractionWithBoundaries () |
virtual void | HGRID_update_move (BaseParticle *, Mdouble) |
virtual void | HGRID_actions_before_integration () |
virtual void | HGRID_actions_after_integration () |
virtual void | do_integration_after_force_computation (BaseParticle *pI) |
This is were the integration is done. More... | |
virtual void | InitBroadPhase () |
Initialisation of Broad Phase Information (Default no Broad Phase so empty) More... | |
virtual void | broad_phase (BaseParticle *i) |
Broad phase of contact detection goes here. Default check all contacts. More... | |
void | set_FixedParticles (unsigned int n) |
void | initialize_tangential_springs () |
void | compute_particle_masses () |
Computes the mass of each particle. More... | |
virtual void | cout_time () |
std::couts time More... | |
virtual bool | continue_solve () |
void | reset_DeltaMax () |
sets the history parameter DeltaMax of all particles to zero More... | |
void | reset_TangentialSprings () |
sets the history parameter TangentialSprings of all particles to zero More... | |
Protected Attributes | |
std::vector< CSpecies > | Species |
These are the particle parameters like dissipation etc. More... | |
![]() | |
std::stringstream | problem_name |
Stores the problem_name. More... | |
std::stringstream | data_filename |
These store the save file names, by default they are derived from problem_name. More... | |
std::stringstream | stat_filename |
std::stringstream | fstat_filename |
std::stringstream | ene_filename |
std::fstream | data_file |
Stream used for data files. More... | |
std::fstream | stat_file |
std::fstream | fstat_file |
std::fstream | ene_file |
unsigned int | options_fstat |
Indicators if files are created or not 0: file will not be created 1: file will be written in one file 2: file will be written in multiple files. More... | |
unsigned int | options_data |
unsigned int | options_stat |
unsigned int | options_ene |
unsigned int | options_restart |
unsigned int | file_counter |
Counter needed if file will be written in multiple files. More... | |
unsigned int | step_size |
Private Member Functions | |
void | Remove_Duplicate_Periodic_Particles () |
Remove periodic duplicate Particles (i.e. removes particles created by Check_and_Duplicate_Periodic_Particle(int i, int nWallPeriodic)). Note that between these two functions it is not allowed to create additional functions. More... | |
int | Check_and_Duplicate_Periodic_Particles () |
Calls Check_and_Duplicate_Periodic_Particle for all Particles curently in Particles[] and returns the number of particles created. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, MD &md) |
A class that defines and solves a MD problem.
|
inline |
Definition at line 75 of file MD.h.
References constructor().
|
inline |
Definition at line 83 of file MD.h.
References constructor().
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
This is action after the time step is finished.
Definition at line 570 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
inlineprotectedvirtual |
This is actions before the start of the main time loop.
todo thomas: can this be erased?
Definition at line 545 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
inlineprotectedvirtual |
This is action before the time step is started.
Reimplemented in Chute, and ChuteBottom.
Definition at line 564 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
inline |
Sets ene_ela.
Definition at line 399 of file MD.h.
References ene_ela.
Referenced by compute_internal_forces(), and compute_walls().
void MD::add_Species | ( | CSpecies & | S | ) |
|
inline |
Definition at line 505 of file MD.h.
References add_Species(), and Species.
Referenced by add_Species().
|
inlineprotectedvirtual |
Broad phase of contact detection goes here. Default check all contacts.
Reimplemented in HGRID_base.
Definition at line 605 of file MD.h.
References BaseHandler< T >::begin(), compute_internal_forces(), and particleHandler.
Referenced by compute_internal_forces().
|
private |
Calls Check_and_Duplicate_Periodic_Particle for all Particles curently in Particles[] and returns the number of particles created.
Definition at line 2719 of file MD.cc.
References boundaryHandler, BaseBoundary::createPeriodicParticles(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), and particleHandler.
Referenced by solve(), and statistics_from_restart_data().
|
protectedvirtual |
Definition at line 1794 of file MD.cc.
References BaseHandler< T >::begin(), boundaryHandler, BaseHandler< T >::end(), and particleHandler.
Referenced by solve().
|
protectedvirtual |
This does the force computation.
Reset all forces to zero
Now loop over all particles contacts computing force contributions
Now loop over all other particles looking for contacts
Definition at line 1935 of file MD.cc.
References WallHandler::begin(), BaseHandler< T >::begin(), compute_external_forces(), compute_internal_forces(), WallHandler::end(), BaseHandler< T >::end(), PossibleContact::get_Next(), PossibleContact::get_P1(), PossibleContact::get_P2(), particleHandler, and wallHandler.
Referenced by solve(), and statistics_from_restart_data().
|
protectedvirtual |
This is were the computation of external forces takes place (e.g. gravity)
This computes the external forces e.g. here it is gravity and walls.
Now add on gravity
Finally walls
Definition at line 1410 of file MD.cc.
References BaseParticle::add_Force(), compute_walls(), get_gravity(), BaseParticle::get_Mass(), and BaseParticle::isFixed().
Referenced by compute_all_forces().
|
protectedvirtual |
Computes the forces between particles (internal in the sence that the sum over all these forces is zero i.e. fully modelled forces)
Definition at line 1980 of file MD.cc.
References broad_phase().
Referenced by broad_phase(), HGRID_2D::CheckCell(), HGRID_3D::CheckCell(), HGRID_2D::CheckCell_current(), HGRID_3D::CheckCell_current(), and compute_all_forces().
|
protectedvirtual |
Computes the forces between particles (internal in the sence that the sum over all these forces is zero i.e. fully modelled forces)
This computer the internal forces (internal in the sence that they sum to zero) i.e. the fully modelled forces.
Tangential spring information is always store in the real particle with highest index When a Periodic contact is encountered it is always encoutered twice (for normal periodic walls), but the force is only applied to the real particle The tangential spring information for periodic particles is stored in the normal particle (and thus twice for normal periodic interactions) When a Particle is removed the tangential spring information has to be moved
Both options are up to first order the same (the first one is nicer becaus it always keeps the spring tangential, whereas the second one is in a nicer intergration form)
The second particle (i.e. the particle the force acts on) is always a flow particle
Definition at line 756 of file MD.cc.
References add_ene_ela(), BaseParticle::add_Force(), BaseParticle::add_Torque(), CSpecies::AdhesionForceType, computeShortRangeForceWithParticle(), Cross(), CTangentialSpring::delta, CSpecies::disp, CSpecies::disprolling, CSpecies::dispt, CSpecies::disptorsion, STD_save::fstat_file, gather_statistics_collision(), BaseParticle::get_AngularVelocity(), get_do_stat_always(), get_dt(), CSpecies::get_ForceType(), BaseParticle::get_Index(), BaseParticle::get_IndSpecies(), BaseParticle::get_InteractionRadius(), BaseParticle::get_Mass(), get_MixedSpecies(), BaseParticle::get_PeriodicFromParticle(), BaseParticle::get_Position(), BaseParticle::get_Radius(), get_save_data_ene(), get_save_data_fstat(), get_save_data_stat(), get_t(), BaseParticle::get_Velocity(), Vec3D::GetLength(), Vec3D::GetLength2, getTangentialSpring(), Hertzian, HM, HMD, BaseParticle::isFixed(), CSpecies::k, CSpecies::krolling, CSpecies::kt, CSpecies::ktorsion, CSpecies::mu, CSpecies::murolling, CSpecies::mus, CSpecies::musrolling, CSpecies::mustorsion, CSpecies::mutorsion, None, R, CTangentialSpring::RollingSpring, Vec3D::set_zero(), CTangentialSpring::sliding, CTangentialSpring::SlidingForce, CTangentialSpring::slidingRolling, CTangentialSpring::slidingTorsion, Species, sqr, CTangentialSpring::TorsionSpring, CSpecies::update_disp(), and CSpecies::useRestitution.
|
inlineprotected |
Computes the mass of each particle.
Definition at line 618 of file MD.h.
References BaseParticle::compute_particle_mass(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), particleHandler, and Species.
Referenced by solve(), and statistics_from_restart_data().
|
protected |
Computes plastic forces between particles.
This computer the internal forces for the plastic model.
Tangential spring information is always store in the real particle with highest index When a Periodic contact is encountered it is always enstd::coutered twice, but only applied when the real particle has the highest index of both real indices When a Particle is removed the tangential spring information has to be moved
newcode begin
Both options are up to first order the same (the first one is nicer becaus it always keeps the spring tangential, whereas the second one is in a nicer intergration form)
The second particle (i.e. the particle the force acts on) is always a flow particle
Definition at line 1139 of file MD.cc.
References BaseParticle::add_Force(), BaseParticle::add_Torque(), CSpecies::AdhesionForceType, computeShortRangeForceWithParticle(), Cross(), CTangentialSpring::delta, CSpecies::depth, CSpecies::disp, CSpecies::dispt, do_stat_always, dt, ene_ela, STD_save::fstat_file, gather_statistics_collision(), BaseParticle::get_AngularVelocity(), DeltaMaxsParticle::get_DeltaMaxs(), CSpecies::get_ForceType(), BaseParticle::get_Index(), BaseParticle::get_IndSpecies(), BaseParticle::get_InteractionRadius(), BaseParticle::get_Mass(), get_MixedSpecies(), BaseParticle::get_PeriodicFromParticle(), BaseParticle::get_Position(), BaseParticle::get_Radius(), BaseParticle::get_Velocity(), Vec3D::GetLength(), Vec3D::GetLength2, getTangentialSpring(), Hertzian, BaseParticle::isFixed(), CSpecies::k, CSpecies::k2max, CSpecies::kc, CSpecies::kt, CSpecies::mu, CSpecies::mus, None, save_data_ene, save_data_fstat, save_data_stat, CDeltaMaxs::select_particle(), Vec3D::set_zero(), Species, sqr, t, CSpecies::update_disp(), and CSpecies::useRestitution.
|
protectedvirtual |
This is were the walls are.
This is were the walls are implemented - normals are outward normals.
Definition at line 1423 of file MD.cc.
References add_ene_ela(), BaseWall::add_Force(), BaseParticle::add_Force(), BaseWall::add_Torque(), BaseParticle::add_Torque(), CSpecies::AdhesionForceType, computeShortRangeForceWithWall(), Cross(), CTangentialSpring::delta, CSpecies::disp, CSpecies::disprolling, CSpecies::dispt, CSpecies::disptorsion, STD_save::fstat_file, gather_statistics_collision(), BaseParticle::get_AngularVelocity(), BaseWall::get_distance_and_normal(), get_do_stat_always(), get_dt(), CSpecies::get_ForceType(), BaseParticle::get_Index(), BaseParticle::get_IndSpecies(), BaseParticle::get_Mass(), get_MixedSpecies(), BaseParticle::get_PeriodicFromParticle(), BaseParticle::get_Position(), BaseParticle::get_Radius(), get_save_data_ene(), get_save_data_fstat(), get_save_data_stat(), get_t(), BaseParticle::get_Torque(), BaseWall::get_Velocity(), BaseParticle::get_Velocity(), Vec3D::GetLength(), Vec3D::GetLength2, WallHandler::getNumberOfWalls(), getTangentialSpringWall(), WallHandler::getWall(), Hertzian, HM, HMD, BaseWall::indSpecies, BaseParticle::isFixed(), CSpecies::k, CSpecies::krolling, CSpecies::kt, CSpecies::ktorsion, CSpecies::mu, CSpecies::murolling, CSpecies::mus, CSpecies::musrolling, CSpecies::mustorsion, CSpecies::mutorsion, None, R, CTangentialSpring::RollingSpring, BaseParticle::set_Torque(), Vec3D::set_zero(), CTangentialSpring::sliding, CTangentialSpring::SlidingForce, CTangentialSpring::slidingRolling, CTangentialSpring::slidingTorsion, Species, sqr, CTangentialSpring::TorsionSpring, CSpecies::update_disp(), CSpecies::useRestitution, and wallHandler.
Referenced by compute_external_forces().
|
protected |
Definition at line 1711 of file MD.cc.
References CSpecies::AdhesionForceType, CSpecies::f0, get_dt(), BaseParticle::get_Index(), BaseParticle::get_Radius(), get_t(), TangentialSpringParticle::get_TangentialSprings(), CSpecies::k0, LinearIrreversible, LinearReversible, and CTangentialSprings::select_particle_spring().
Referenced by compute_internal_forces(), and compute_plastic_internal_forces().
|
protected |
Definition at line 1744 of file MD.cc.
References CSpecies::AdhesionForceType, CSpecies::f0, get_dt(), BaseParticle::get_Radius(), get_t(), TangentialSpringParticle::get_TangentialSprings(), CSpecies::k0, LinearIrreversible, LinearReversible, and CTangentialSprings::select_wall_spring().
Referenced by compute_walls().
void MD::constructor | ( | ) |
A public constructor, which sets defaults so the problem can be solved off the shelf.
todo{to incorporate changes in icc a make clean is required. Why?}
This is where the constructor is defines setup a basic two dimensional problem which can be solved off the shelf///
Definition at line 50 of file MD.cc.
References data_FixedParticles, dim, dt, format, gravity, particleHandler, PeriodicCreated, STD_save::problem_name, random, save_restart_data_counter, set_append(), set_dim_particle(), set_do_stat_always(), set_k(), RNG::set_RandomSeed(), set_restarted(), set_rho(), set_save_count_all(), ParticleHandler::setSpecies(), BaseHandler< T >::setStorageCapacity(), Species, tmax, xballs_additional_arguments, xballs_cmode, xballs_scale, xballs_vscale, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by MD().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
virtual |
This creates a scipt which can be used to load the xballs problem to display the data just generated.
This automatically creates an xballs script to plot the data you have just generated///.
First put in all the script lines. All these lines do is move you to the correct directory from any location
Definition at line 84 of file MD_xballs.icc.
References STD_save::data_filename, dim, format, STD_save::get_options_data(), STD_save::problem_name, xballs_additional_arguments, xballs_cmode, xballs_scale, xballs_vscale, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by solve(), and StatisticsVector< T >::statistics_from_p3().
|
protectedvirtual |
This is were the integration is done.
This is were the integration is done, at the moment it is Velocity Verlet integration.
Definition at line 1843 of file MD.cc.
References BaseParticle::accelerate(), BaseParticle::angularAccelerate(), boundaryHandler, PeriodicBoundary::distance(), dt, BaseParticle::get_AngularVelocity(), BaseParticle::get_Force(), get_HGRID_UpdateEachTimeStep(), BaseParticle::get_Index(), BaseParticle::get_InvInertia(), BaseParticle::get_InvMass(), BaseParticle::get_Position(), get_t(), BaseParticle::get_Torque(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), HGRID_RemoveParticleFromHgrid(), HGRID_UpdateParticleInHgrid(), BaseParticle::rotate(), rotation, BaseParticle::set_Position(), BaseParticle::set_Velocity(), and PeriodicBoundary::shift_position().
Referenced by solve().
|
protectedvirtual |
This is were the integration is done.
This is were the integration is done, at the moment it is Velocity Verlet integration.
Definition at line 1773 of file MD.cc.
References BaseParticle::accelerate(), BaseParticle::angularAccelerate(), dt, BaseParticle::get_AngularVelocity(), BaseParticle::get_Displacement(), BaseParticle::get_Force(), BaseParticle::get_Index(), BaseParticle::get_InvInertia(), BaseParticle::get_InvMass(), get_t(), BaseParticle::get_Torque(), BaseParticle::get_Velocity(), Vec3D::GetLength(), HGRID_update_move(), BaseParticle::move(), BaseParticle::rotate(), rotation, and BaseParticle::set_Displacement().
Referenced by solve().
bool MD::find_next_data_file | ( | Mdouble | tmin, |
bool | verbose = true |
||
) |
Definition at line 426 of file MD.cc.
References STD_save::data_file, STD_save::get_data_filename(), STD_save::get_file_counter(), STD_save::get_options_data(), STD_save::increase_counter_data(), STD_save::set_file_counter(), and t.
|
inlineprotectedvirtual |
|
protectedvirtual |
Definition at line 145 of file MD.cc.
References STD_save::fstat_file, BaseParticle::get_Radius(), get_t(), get_xmax(), get_xmin(), get_ymax(), get_ymin(), get_zmax(), get_zmin(), getLargestParticle(), and getSmallestParticle().
Referenced by solve().
|
inlineprotectedvirtual |
Reimplemented in StatisticsVector< T >.
Definition at line 584 of file MD.h.
Referenced by compute_internal_forces(), compute_plastic_internal_forces(), and compute_walls().
|
inline |
Gets restarted.
Definition at line 389 of file MD.h.
References append.
Referenced by solve(), and start_ene().
Calculates collision time for two copies of a particle of given disp, k, mass.
Definition at line 300 of file MD.h.
References Species.
Referenced by Chute::get_collision_time(), set_dt(), and set_dt_by_mass().
|
inline |
Allows the dimension of the simulation to be accessed.
Definition at line 369 of file MD.h.
References dim.
Referenced by HGridOptimiser::Initialise(), output_xballs_data_particle(), and StatisticsVector< T >::set_nz().
Allows the normal dissipation to be accessed.
Definition at line 239 of file MD.h.
References Species.
Referenced by Chute::readNextArgument(), and readNextArgument().
Allows the tangential viscosity to be accessed.
Definition at line 230 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the tangential viscosity to be accessed.
Definition at line 226 of file MD.h.
References Species.
Referenced by Chute::readNextArgument(), and readNextArgument().
Allows the normal dissipation to be accessed.
Definition at line 243 of file MD.h.
References Species.
Referenced by Chute::set_collision_time_and_restitution_coefficient().
|
inline |
Definition at line 269 of file MD.h.
References do_stat_always.
Referenced by compute_internal_forces(), and compute_walls().
|
inline |
Allows the time step dt to be accessed.
Definition at line 339 of file MD.h.
References dt.
Referenced by StatisticsVector< T >::check_current_time_for_statistics(), compute_internal_forces(), compute_walls(), computeShortRangeForceWithParticle(), computeShortRangeForceWithWall(), getTangentialSpring(), getTangentialSpringWall(), load_par_ini_file(), ChuteBottom::make_rough_bottom(), and readNextArgument().
|
inline |
|
inline |
Definition at line 508 of file MD.h.
References format.
Referenced by output_xballs_data_particle().
|
inline |
Allows the gravitational acceleration to be accessed.
Definition at line 364 of file MD.h.
References gravity.
Referenced by compute_external_forces(), output_ene(), and Chute::set_ChuteAngle().
|
inlineprotectedvirtual |
Definition at line 561 of file MD.h.
Referenced by do_integration_after_force_computation().
Allows the spring constant to be accessed.
Definition at line 206 of file MD.h.
References Species.
Referenced by Chute::readNextArgument(), and readNextArgument().
Definition at line 194 of file MD.h.
References Species.
Referenced by read_next_from_data_file().
Allows the spring constant to be accessed.
Definition at line 214 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the spring constant to be accessed.
Definition at line 210 of file MD.h.
References Species.
Referenced by Chute::readNextArgument(), and readNextArgument().
Definition at line 407 of file MD.h.
References BaseParticle::compute_particle_mass(), BaseParticle::get_Mass(), BaseParticle::set_IndSpecies(), BaseParticle::set_Radius(), and Species.
|
inline |
|
inline |
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other)
Definition at line 416 of file MD.h.
References BaseParticle::get_IndSpecies(), BaseParticle::get_Mass(), BaseParticle::get_Radius(), and Species.
|
inline |
Definition at line 431 of file MD.h.
References BaseParticle::get_IndSpecies(), BaseParticle::get_Mass(), BaseParticle::get_Radius(), getSmallestParticle(), and Species.
Allows the mixed species to be accessed.
Definition at line 131 of file MD.h.
References Species.
Referenced by compute_internal_forces(), compute_plastic_internal_forces(), and compute_walls().
Allows the Coulomb friction coefficient to be accessed.
Definition at line 247 of file MD.h.
References Species.
Referenced by read_next_from_data_file(), readNextArgument(), and solve().
Allows the Coulomb friction coefficient to be accessed.
Definition at line 251 of file MD.h.
References Species.
Referenced by readNextArgument().
|
inline |
|
inline |
Gets restart_version.
Definition at line 372 of file MD.h.
References restart_version.
Referenced by Chute::read().
|
inline |
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition at line 302 of file MD.h.
References Species.
Referenced by Chute::get_restitution_coefficient().
Allows the density to be accessed.
Definition at line 222 of file MD.h.
References Species.
Referenced by Chute::set_collision_time_and_restitution_coefficient().
|
inline |
|
inline |
|
inline |
Definition at line 164 of file MD.h.
References save_count_data.
Referenced by get_save_count(), and get_savecount().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 266 of file MD.h.
References save_data_ene.
Referenced by compute_internal_forces(), and compute_walls().
|
inline |
Definition at line 267 of file MD.h.
References save_data_fstat.
Referenced by compute_internal_forces(), and compute_walls().
|
inline |
Definition at line 268 of file MD.h.
References save_data_stat.
Referenced by compute_internal_forces(), and compute_walls().
|
inline |
Allows the number of time steps between saves to be accessed.
Definition at line 162 of file MD.h.
References get_save_count_data().
|
inline |
|
inline |
Access function for the time.
Definition at line 108 of file MD.h.
References t.
Referenced by StatisticsVector< T >::check_current_time_for_statistics(), compute_internal_forces(), compute_walls(), computeShortRangeForceWithParticle(), computeShortRangeForceWithWall(), Chute::cout_time(), do_integration_after_force_computation(), do_integration_before_force_computation(), StatisticsVector< T >::evaluate_particle_statistics(), fstat_header(), getTangentialSpring(), getTangentialSpringWall(), and output_ene().
|
inline |
Allows the upper time limit to be accessed.
Definition at line 144 of file MD.h.
References tmax.
Referenced by Chute::cout_time(), StatisticsVector< T >::get_tmaxStat(), and readNextArgument().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get xmax.
Definition at line 307 of file MD.h.
References xmax.
Referenced by Chute::clean_chute(), Chute::create_bottom(), fstat_header(), Chute::get_ChuteLength(), ChuteWithHopperAndInset::get_ChuteLength(), ChuteWithHopper::get_ChuteLength(), ChuteWithHopperAndInset::get_MaximumVelocityInducedByGravity(), ChuteWithHopper::get_MaximumVelocityInducedByGravity(), StatisticsVector< T >::get_xmaxStat(), HGridOptimiser::Initialise(), load_par_ini_file(), ChuteWithHopperAndInset::set_shift(), ChuteWithHopper::set_shift(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Get xmin.
Definition at line 305 of file MD.h.
References xmin.
Referenced by Chute::clean_chute(), Chute::create_bottom(), Chute::create_inflow_particle(), fstat_header(), StatisticsVector< T >::get_xminStat(), HGridOptimiser::Initialise(), load_par_ini_file(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Gets ymax.
Definition at line 311 of file MD.h.
References ymax.
Referenced by ChuteWithHopperAndInset::add_hopper(), ChuteWithHopper::add_hopper(), Chute::create_bottom(), Chute::create_inflow_particle(), ChuteWithHopper::create_inflow_particle(), ChuteWithHopperAndInset::create_inflow_particle(), fstat_header(), Chute::get_ChuteWidth(), StatisticsVector< T >::get_ymaxStat(), HGridOptimiser::Initialise(), load_par_ini_file(), Chute::setup_particles_initial_conditions(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Gets ymin.
Definition at line 309 of file MD.h.
References ymin.
Referenced by ChuteWithHopperAndInset::add_hopper(), ChuteWithHopper::add_hopper(), Chute::create_bottom(), Chute::create_inflow_particle(), ChuteWithHopper::create_inflow_particle(), ChuteWithHopperAndInset::create_inflow_particle(), fstat_header(), StatisticsVector< T >::get_yminStat(), HGridOptimiser::Initialise(), load_par_ini_file(), Chute::setup_particles_initial_conditions(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Gets zmax.
Definition at line 315 of file MD.h.
References zmax.
Referenced by Chute::create_inflow_particle(), fstat_header(), StatisticsVector< T >::get_zmaxStat(), HGridOptimiser::Initialise(), load_par_ini_file(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Gets zmin.
Definition at line 313 of file MD.h.
References zmin.
Referenced by Chute::create_bottom(), Chute::create_inflow_particle(), fstat_header(), StatisticsVector< T >::get_zminStat(), HGridOptimiser::Initialise(), load_par_ini_file(), and ChuteBottom::setup_particles_initial_conditions().
|
inline |
Definition at line 149 of file MD.h.
References boundaryHandler.
Referenced by Chute::setup_particles_initial_conditions(), and ChuteBottom::setup_particles_initial_conditions().
|
inlinevirtual |
Allows the user to set what is written into the info column in the data file. By default is store the Species ID number.
Definition at line 463 of file MD.h.
References BaseParticle::get_Species().
Referenced by output_xballs_data_particle().
|
inlinevirtual |
Reimplemented in Chute.
Definition at line 419 of file MD.h.
References ParticleHandler::getLargestParticle(), and particleHandler.
Referenced by fstat_header(), HGRID_base::InitBroadPhase(), and solve().
|
inline |
Definition at line 147 of file MD.h.
References particleHandler.
Referenced by ChuteWithHopper::add_hopper(), Chute::add_particle(), Chute::clean_chute(), Chute::cout_time(), Chute::create_bottom(), Chute::get_LargestParticleInteractionRadius(), Chute::get_LightestParticleMass(), Chute::get_SmallestParticleInteractionRadius(), Chute::getLargestParticle(), Chute::getSmallestParticle(), HGRID_base::HGRID_actions_before_time_step(), HGRID_base::InitBroadPhase(), HGridOptimiser::Initialise(), Chute::IsInsertable(), ChuteBottom::make_rough_bottom(), output_ene(), output_xballs_data_particle(), HGRID_base::set_HGRID_num_buckets_to_power(), ChuteBottom::setup_particles_initial_conditions(), and solve().
|
inlinevirtual |
Reimplemented in Chute.
Definition at line 418 of file MD.h.
References ParticleHandler::getSmallestParticle(), and particleHandler.
Referenced by fstat_header(), get_maximum_velocity(), HGRID_base::InitBroadPhase(), and set_dt().
|
protected |
Definition at line 706 of file MD.cc.
References CTangentialSprings::create_new(), dt, get_dt(), BaseParticle::get_Index(), get_t(), TangentialSpringParticle::get_TangentialSprings(), CTangentialSprings::select_particle_spring(), and t.
Referenced by compute_internal_forces(), and compute_plastic_internal_forces().
|
protected |
Definition at line 741 of file MD.cc.
References CTangentialSprings::create_new_wall(), dt, get_dt(), get_t(), TangentialSpringParticle::get_TangentialSprings(), CTangentialSprings::select_wall_spring(), and t.
Referenced by compute_walls().
|
inline |
Definition at line 148 of file MD.h.
References wallHandler.
Referenced by ChuteWithHopper::add_hopper(), Chute::create_bottom(), Chute::setup_particles_initial_conditions(), and ChuteBottom::setup_particles_initial_conditions().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
This is actions before the start of the main time loop.
Reimplemented in HGRID_base.
Definition at line 552 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
inlineprotectedvirtual |
This is action before the time step is started.
Reimplemented in HGRID_base.
Definition at line 555 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Definition at line 560 of file MD.h.
Referenced by do_integration_after_force_computation(), and removeParticle().
|
inlineprotectedvirtual |
Reimplemented in HGRID_base.
Definition at line 594 of file MD.h.
Referenced by do_integration_before_force_computation().
|
inlineprotectedvirtual |
Definition at line 559 of file MD.h.
Referenced by do_integration_after_force_computation(), HGRID_base::HGRID_actions_before_time_step(), and HGRID_base::InitBroadPhase().
|
inlinevirtual |
|
inlineprotectedvirtual |
Initialisation of Broad Phase Information (Default no Broad Phase so empty)
Reimplemented in HGRID_base.
|
inlineprotectedvirtual |
Functions for statistics.
Reimplemented in StatisticsVector< T >.
Definition at line 582 of file MD.h.
Referenced by solve(), and statistics_from_restart_data().
|
protected |
bool MD::load_from_data_file | ( | const char * | filename, |
unsigned int | format = 0 |
||
) |
This allows particle data to be reloaded from data files.
This function loads data from the .data file i.e.
you get position, mass and velocity information only See also MD::load_restart_data Can read in format 14 - 8 or format 7 data This code saves in format 8 for 2D and format 14 for 3D so if no extra parameters are specified it will assume this note: many parameters, like density cannot be set using the data file
Definition at line 250 of file MD.cc.
References STD_save::data_file, STD_save::get_options_data(), STD_save::options_data, read_next_from_data_file(), and STD_save::set_options_data().
Referenced by readNextArgument(), and statistics_from_restart_data().
bool MD::load_par_ini_file | ( | const char * | filename | ) |
allows the user to read par.ini files (useful to read MDCLR files)
Definition at line 271 of file MD.cc.
References boundaryHandler, BaseHandler< T >::copyAndAddObject(), WallHandler::copyAndAddWall(), get_dt(), get_xmax(), get_xmin(), get_ymax(), get_ymin(), get_zmax(), get_zmin(), PeriodicBoundary::set(), InfiniteWall::set(), set_dim_particle(), set_disp(), set_dt(), set_gravity(), set_k(), set_rho(), set_save_count_data(), set_save_count_fstat(), set_savecount(), set_t(), set_tmax(), and wallHandler.
int MD::load_restart_data | ( | ) |
Loads all MD data.
This function loads all MD data - See also MD::save_restart_data, MD::load_from_data_file This function return 1 if sucessful else it returns -1.
Definition at line 685 of file MD.cc.
References STD_save::problem_name.
Referenced by readNextArgument(), and statistics_from_restart_data().
int MD::load_restart_data | ( | std::string | filename | ) |
Definition at line 692 of file MD.cc.
References read(), and set_restarted().
|
protectedvirtual |
This function outputs statistical data - The default is to compute the rotational kinetic engergy, linear kinetic energy, and the centre of mass.
todo{Why is there a +6 here?}
Definition at line 175 of file MD.cc.
References BaseHandler< T >::end(), STD_save::ene_file, get_ene_ela(), get_gravity(), get_t(), getParticleHandler(), and set_ene_ela().
Referenced by solve(), and statistics_from_restart_data().
|
inlineprotectedvirtual |
|
protectedvirtual |
Output xball data for Particle i.
This function outputs the location and velocity of the particle in a format the xballs progream can read.
Definition at line 209 of file MD.cc.
References STD_save::data_file, dim, format, BaseHandler< T >::getNumberOfObjects(), output_xballs_data_particle(), particleHandler, t, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by solve(), and StatisticsVector< T >::statistics_from_p3().
|
protectedvirtual |
This function outputs the location and velocity of the particle in a format the xballs progream can read.
Definition at line 30 of file MD_xballs.icc.
References STD_save::data_file, BaseParticle::get_Angle(), BaseParticle::get_AngularVelocity(), get_dim(), get_format(), BaseParticle::get_Position(), BaseParticle::get_Radius(), BaseParticle::get_Velocity(), getInfo(), BaseHandler< T >::getObject(), getParticleHandler(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by output_xballs_data().
|
virtual |
Outputs MD.
Reimplemented in ChuteWithHopperAndInset, Chute, and HGRID_base.
Definition at line 1806 of file MD.cc.
References boundaryHandler, dim, dt, BaseHandler< T >::getNumberOfObjects(), WallHandler::getNumberOfWalls(), BaseHandler< T >::getObject(), BaseHandler< T >::getStorageCapacity(), WallHandler::getWall(), gravity, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, STD_save::options_restart, particleHandler, BaseBoundary::print(), BaseParticle::print(), BaseWall::print(), STD_save::problem_name, save_count_data, save_count_ene, save_count_fstat, save_count_stat, Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by info(), HGRID_base::print(), StatisticsVector< T >::statistics_from_fstat_and_data(), and StatisticsVector< T >::statistics_from_p3().
|
inlineprotectedvirtual |
|
virtual |
Reads all MD data.
Reimplemented in ChuteWithHopper, ChuteWithHopperAndInset, Chute, and HGRID_base.
Definition at line 2026 of file MD.cc.
References boundaryHandler, WallHandler::clear(), ParticleHandler::clear(), BaseHandler< T >::clear(), BaseParticle::compute_particle_mass(), data_FixedParticles, dim, dt, BaseHandler< T >::getLastObject(), getLineFromStringStream(), gravity, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, STD_save::options_restart, particleHandler, STD_save::problem_name, read_v1(), read_v2(), BoundaryHandler::readObject(), ParticleHandler::readObject(), WallHandler::readWall(), restart_version, save_count_data, save_count_ene, save_count_fstat, save_count_stat, Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by load_restart_data(), and HGRID_base::read().
int MD::read_dim_from_data_file | ( | ) |
Definition at line 628 of file MD.cc.
References STD_save::data_file, STD_save::data_filename, t, xmax, xmin, ymax, ymin, zmax, and zmin.
bool MD::read_next_from_data_file | ( | unsigned int | format = 0 | ) |
by default format do not pass an argument; only specify format if you have to read a special format (f.e. dim=2, but format=14 (3d format))
Definition at line 453 of file MD.cc.
References BaseHandler< T >::begin(), BaseHandler< T >::copyAndAddObject(), STD_save::data_file, data_FixedParticles, dim, BaseHandler< T >::end(), BaseParticle::fixParticle(), get_k2max(), get_mu(), STD_save::get_options_data(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), STD_save::increase_counter_data(), particleHandler, BaseHandler< T >::removeLastObject(), reset_TangentialSprings(), Species, t, Vec3D::X, xmax, xmin, Vec3D::Y, ymax, ymin, Vec3D::Z, zmax, and zmin.
Referenced by load_from_data_file(), and StatisticsVector< T >::read_next_from_data_file().
|
virtual |
Reads all MD data.
Definition at line 2217 of file MD.cc.
References boundaryHandler, BaseParticle::compute_particle_mass(), dt, BaseHandler< T >::getLastObject(), getLineFromStringStream(), gravity, max_radius, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, particleHandler, STD_save::problem_name, BoundaryHandler::readObject(), ParticleHandler::readObject(), WallHandler::readWall(), save_count_data, save_count_ene, save_count_fstat, save_count_stat, WallHandler::setStorageCapacity(), BaseHandler< T >::setStorageCapacity(), Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by read().
|
virtual |
Definition at line 2121 of file MD.cc.
References boundaryHandler, WallHandler::clear(), ParticleHandler::clear(), BaseHandler< T >::clear(), BaseParticle::compute_particle_mass(), data_FixedParticles, dim, dt, BaseHandler< T >::getLastObject(), getLineFromStringStream(), gravity, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, STD_save::options_restart, particleHandler, BoundaryHandler::readObject(), ParticleHandler::readObject(), WallHandler::readWall(), save_count_data, save_count_ene, save_count_fstat, save_count_stat, Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by read().
Can interpret main function input arguments that are passed by the driver codes.
Definition at line 2535 of file MD.cc.
References readNextArgument().
Referenced by solve().
argv[i+1] interpreted as argument of type char*, Mdouble, integer or boolean unless noted
-gravity requires three arguments
-restart or -r loads a restart file. By default, it loads <get_name()>.restart. If an argument "arg" is given it loads the file "arg", or "arg".restart (if the ending is not given).
Reimplemented in ChuteWithHopper, ChuteWithHopperAndInset, Chute, and HGRID_base.
Definition at line 2554 of file MD.cc.
References STD_save::auto_number(), get_disp(), get_disprolling(), get_dispt(), get_dt(), get_k(), get_krolling(), get_kt(), get_mu(), get_murolling(), STD_save::get_name(), get_tmax(), Hertzian, load_from_data_file(), load_restart_data(), random, RNG::randomise(), set_append(), STD_save::set_counter(), set_dim(), set_dim_particle(), set_disp(), set_disprolling(), set_dispt(), set_dt(), set_FixedParticles(), set_gravity(), set_k(), set_krolling(), set_kt(), set_mu(), set_murolling(), set_name(), set_number_of_saves_all(), STD_save::set_options_data(), STD_save::set_options_ene(), STD_save::set_options_fstat(), STD_save::set_options_restart(), STD_save::set_options_stat(), set_rho(), set_save_count_data(), set_save_count_ene(), set_save_count_fstat(), set_save_count_stat(), set_savecount(), set_tmax(), set_xmax(), set_xmin(), set_ymax(), set_ymin(), set_zmax(), set_zmin(), and Species.
Referenced by readArguments(), and HGRID_base::readNextArgument().
|
private |
Remove periodic duplicate Particles (i.e. removes particles created by Check_and_Duplicate_Periodic_Particle(int i, int nWallPeriodic)). Note that between these two functions it is not allowed to create additional functions.
Remove periodic duplicate Particles (i.e. removes particles created by Check_and_Duplicate_Periodic_Particle(int i, int nWallPeriodic)). Note that between these two functions it is not allowed to create additional functions. It returns the number of Particles removed.
Definition at line 2703 of file MD.cc.
References BaseParticle::get_PeriodicFromParticle(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), particleHandler, PeriodicCreated, R, and removeParticle().
Referenced by solve(), and statistics_from_restart_data().
void MD::Remove_Particle | ( | int | IP | ) |
This function removes partice IP from the vector of particles by moving the last particle in the vector to the position if IP Also it checks if the moved Particle has any tangentialsspring-information, which needs to be moved to a different particle, because tangential spring information always needs to be stored in the real particle with highest particle index.
|
inlinevirtual |
Definition at line 420 of file MD.h.
References BaseHandler< T >::getObject(), HGRID_RemoveParticleFromHgrid(), particleHandler, and BaseHandler< T >::removeObject().
Referenced by Chute::clean_chute(), and Remove_Duplicate_Periodic_Particles().
|
inlineprotected |
sets the history parameter DeltaMax of all particles to zero
Definition at line 633 of file MD.h.
References BaseHandler< T >::begin(), BaseHandler< T >::end(), DeltaMaxsParticle::get_DeltaMaxs(), and particleHandler.
|
inlineprotected |
sets the history parameter TangentialSprings of all particles to zero
Definition at line 644 of file MD.h.
References BaseHandler< T >::begin(), BaseHandler< T >::end(), TangentialSpringParticle::get_TangentialSprings(), and particleHandler.
Referenced by read_next_from_data_file().
|
virtual |
Stores all MD data.
This function stores all MD data - See also MD::load_restart_data.
todo{This can probably done a lot nicer}
Definition at line 654 of file MD.cc.
References STD_save::options_restart, STD_save::problem_name, save_restart_data_counter, and write().
Referenced by solve(), and StatisticsVector< T >::statistics_from_p3().
|
inline |
Sets restarted.
Definition at line 391 of file MD.h.
References append.
Referenced by constructor(), readNextArgument(), and set_restarted().
|
inline |
See CSpecies::set_collision_time_and_normal_and_tangential_restitution_coefficient.
Definition at line 289 of file MD.h.
References Species.
|
inline |
See CSpecies::set_collision_time_and_normal_and_tangential_restitution_coefficient.
Definition at line 294 of file MD.h.
References Species.
|
inline |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Definition at line 276 of file MD.h.
References Species.
|
inline |
Set k, disp such that is matches a given tc and eps for a collision of two different masses.
Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also set_collision_time_and_restitution_coefficient(Mdouble tc, Mdouble eps, Mdouble mass)
Definition at line 283 of file MD.h.
References Species.
Definition at line 189 of file MD.h.
References Species.
|
inline |
Allows the dimension of the simulation to be changed.
Definition at line 367 of file MD.h.
References dim.
Referenced by HGRID_3D::constructor(), readNextArgument(), and StatisticsVector< T >::statistics_from_p3().
Allows the dimension of the particle (f.e. for mass) to be changed.
Definition at line 261 of file MD.h.
References Species.
Referenced by HGRID_3D::constructor(), constructor(), load_par_ini_file(), and readNextArgument().
Allows the normal dissipation to be changed.
Definition at line 237 of file MD.h.
References Species.
Referenced by load_par_ini_file(), and readNextArgument().
Allows the tangential viscosity to be changed.
Definition at line 228 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the tangential viscosity to be changed.
Definition at line 224 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the tangential viscosity to be changed.
Definition at line 232 of file MD.h.
References Species.
Allows the normal dissipation to be changed.
Definition at line 241 of file MD.h.
References Species.
Referenced by Chute::set_collision_time_and_restitution_coefficient().
|
inline |
Sets how often the data is saved using the number of saves wanted, tmax, and dt. See also set_savecount.
Definition at line 170 of file MD.h.
References do_stat_always.
Referenced by constructor().
|
inline |
|
inline |
Sets dt to 1/50-th of the collision time for two copies of P.
Definition at line 440 of file MD.h.
References dt, get_collision_time(), BaseParticle::get_IndSpecies(), BaseParticle::get_Mass(), and Species.
|
inline |
Sets dt to 1/50-th of the smallest possible collision time.
Definition at line 447 of file MD.h.
References BaseParticle::compute_particle_mass(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), getSmallestParticle(), particleHandler, setup_particles_initial_conditions(), and Species.
Referenced by actions_before_time_loop(), load_par_ini_file(), readNextArgument(), and Chute::set_dt().
|
inline |
Sets dt to 1/50-th of the collision time for two particles of mass P.
Definition at line 437 of file MD.h.
References dt, and get_collision_time().
|
inline |
|
inlineprotected |
Definition at line 613 of file MD.h.
References BaseParticle::fixParticle(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), and particleHandler.
Referenced by readNextArgument().
|
inline |
Definition at line 507 of file MD.h.
References format.
Referenced by StatisticsVector< T >::statistics_from_p3().
|
inline |
Allows the gravitational acceleration to be changed.
Definition at line 362 of file MD.h.
References gravity.
Referenced by load_par_ini_file(), readNextArgument(), and Chute::set_ChuteAngle().
|
inlineprotectedvirtual |
Allows the spring constant to be changed.
Definition at line 204 of file MD.h.
References Species.
Referenced by constructor(), load_par_ini_file(), readNextArgument(), and Chute::set_collision_time_and_restitution_coefficient().
Definition at line 183 of file MD.h.
References Species.
Definition at line 185 of file MD.h.
References Species.
|
inline |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Definition at line 272 of file MD.h.
References Species.
Definition at line 187 of file MD.h.
References Species.
Allows the spring constant to be changed.
Definition at line 212 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the spring constant to be changed.
Definition at line 208 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the spring constant to be changed.
Definition at line 216 of file MD.h.
References Species.
Allows the Coulomb friction coefficient to be changed.
Definition at line 245 of file MD.h.
References Species.
Referenced by ChuteBottom::make_rough_bottom(), and readNextArgument().
Allows the Coulomb friction coefficient to be changed.
Definition at line 249 of file MD.h.
References Species.
Referenced by readNextArgument().
Allows the Coulomb friction coefficient to be changed.
Definition at line 253 of file MD.h.
References Species.
|
inline |
Sets the name of the problem, used for the same data files.
Definition at line 342 of file MD.h.
References STD_save::problem_name.
Referenced by ChuteBottom::constructor(), and readNextArgument().
|
inline |
|
inline |
Definition at line 172 of file MD.h.
References dt, set_save_count_all(), and tmax.
Referenced by readNextArgument(), and set_number_of_saves().
|
inline |
Definition at line 173 of file MD.h.
References dt, save_count_data, and tmax.
|
inline |
Definition at line 174 of file MD.h.
References dt, save_count_ene, and tmax.
|
inline |
Definition at line 176 of file MD.h.
References dt, save_count_fstat, and tmax.
|
inline |
Definition at line 175 of file MD.h.
References dt, save_count_stat, and tmax.
|
inline |
Allows the plastic constants to be changed.
Definition at line 181 of file MD.h.
References Species.
|
inline |
|
inline |
Definition at line 383 of file MD.h.
References restarted, and set_append().
Referenced by constructor(), and load_restart_data().
Allows the density to be changed.
Definition at line 220 of file MD.h.
References Species.
Referenced by constructor(), load_par_ini_file(), and readNextArgument().
|
inline |
|
inline |
Definition at line 156 of file MD.h.
References save_count_data, save_count_ene, save_count_fstat, and save_count_stat.
Referenced by constructor(), set_number_of_saves_all(), and set_savecount().
|
inline |
Definition at line 157 of file MD.h.
References save_count_data.
Referenced by load_par_ini_file(), and readNextArgument().
|
inline |
Definition at line 158 of file MD.h.
References save_count_ene.
Referenced by readNextArgument().
|
inline |
Definition at line 160 of file MD.h.
References save_count_fstat.
Referenced by load_par_ini_file(), and readNextArgument().
|
inline |
Definition at line 159 of file MD.h.
References save_count_stat.
Referenced by readNextArgument().
|
inline |
Allows the number of time steps between saves to be changed, see also set_number_of_saves.
Definition at line 155 of file MD.h.
References set_save_count_all().
Referenced by load_par_ini_file(), ChuteBottom::make_rough_bottom(), and readNextArgument().
|
inline |
|
inline |
Allows the upper time limit to be changed.
Definition at line 142 of file MD.h.
References tmax.
Referenced by load_par_ini_file(), ChuteBottom::make_rough_bottom(), and readNextArgument().
|
inline |
Set the additional arguments for xballs.
Definition at line 354 of file MD.h.
References xballs_additional_arguments.
|
inline |
|
inline |
|
inline |
Set the scale of the xballs problem. The default is fit to screen.
Definition at line 358 of file MD.h.
References xballs_scale.
|
inline |
|
inline |
Sets xmax and walls, assuming the standard definition of walls as in the default constructor.
Definition at line 328 of file MD.h.
Referenced by readNextArgument(), Chute::set_ChuteLength(), ChuteWithHopperAndInset::set_ChuteLength(), ChuteWithHopper::set_ChuteLength(), ChuteWithHopperAndInset::set_shift(), and ChuteWithHopper::set_shift().
|
inline |
Sets xmin and walls, assuming the standard definition of walls as in the default constructor.
Definition at line 318 of file MD.h.
Referenced by readNextArgument(), ChuteWithHopperAndInset::set_ChuteLength(), and ChuteWithHopper::set_ChuteLength().
|
inline |
Sets ymax and walls, assuming the standard definition of walls as in the default constructor.
Definition at line 331 of file MD.h.
Referenced by readNextArgument(), and Chute::set_ChuteWidth().
|
inline |
Definition at line 320 of file MD.h.
Referenced by readNextArgument().
|
inline |
Sets ymax and walls, assuming the standard definition of walls as in the default constructor.
Definition at line 334 of file MD.h.
References ymin, zmax, and zmin.
Referenced by ChuteWithHopperAndInset::add_hopper(), ChuteWithHopper::add_hopper(), Chute::readNextArgument(), readNextArgument(), and Chute::set_InflowHeight().
|
inline |
Sets ymin and walls, assuming the standard definition of walls as in the default constructor.
Definition at line 324 of file MD.h.
Referenced by readNextArgument().
|
virtual |
This function allows the initial conditions of the particles to be set, by default locations is random.
This setup the particles initial conditions it is virtual as you expect the user to override this.
Remember particle properties must also be defined here.
By default the particles are randomly disibuted///
Reimplemented in ChuteBottom, ChuteWithHopper, ChuteWithHopperAndInset, Chute, and ChuteWithHopperAndInset.
void MD::solve | ( | ) |
The work horse of the code.
This is the main solve loop where all the action takes place///.
This is where the main code works
Print counter if it is used
Set up the data file names
Initialise the time and sets up the initial conditions for the simulation
Set up the data file names
This creates the file the data will be saved to
Set up the ene file names
This creates the file ene will be saved to
Set up the fstat file names
This creates the file fstatistics will be saved to
initializes PrevPosition if PositionVerlet is used
Setup the mass of each particle.
Other initializations
velocity verlet requires initial force calculation
This is the main loop over advancing time
Here we output to the data file
Check if rotation is on
Loop over all particles doing the time integration step
Output statistical information
Compute forces
bug{In chute particles are added in actions_before_time_set(), however they are not written to the xballs data yet, but can have a collison and be written to the fstat data}
Loop over all particles doing the time integration step
Definition at line 2266 of file MD.cc.
References actions_after_solve(), actions_after_time_step(), actions_before_time_loop(), actions_before_time_step(), append, BaseHandler< T >::begin(), boundaryHandler, Check_and_Duplicate_Periodic_Particles(), checkInteractionWithBoundaries(), compute_all_forces(), compute_particle_masses(), continue_solve(), cout_time(), create_xballs_script(), STD_save::data_file, do_integration_after_force_computation(), do_integration_before_force_computation(), do_stat_always, dt, BaseHandler< T >::end(), ene_ela, STD_save::ene_file, finish_statistics(), STD_save::fstat_file, fstat_header(), get_append(), STD_save::get_counter(), get_mu(), STD_save::get_options_data(), STD_save::get_options_ene(), STD_save::get_options_fstat(), STD_save::get_options_restart(), STD_save::get_options_stat(), BaseParticle::get_Position(), BaseParticle::get_Radius(), BaseParticle::get_Velocity(), getLargestParticle(), BaseHandler< T >::getObject(), getParticleHandler(), gravity, HGRID_actions_after_integration(), HGRID_actions_before_integration(), HGRID_actions_before_time_loop(), HGRID_actions_before_time_step(), STD_save::increase_counter_data(), STD_save::increase_counter_ene(), STD_save::increase_counter_fstat(), STD_save::increase_counter_stat(), initialize_statistics(), max_radius, STD_save::open_data_file(), STD_save::open_ene_file(), STD_save::open_fstat_file(), output_ene(), output_statistics(), output_xballs_data(), particleHandler, PeriodicCreated, STD_save::problem_name, process_statistics(), random, Remove_Duplicate_Periodic_Particles(), restarted, rotation, save_count_data, save_count_ene, save_count_fstat, save_count_stat, save_data_data, save_data_ene, save_data_fstat, save_data_stat, save_restart_data(), STD_save::set_data_filename(), STD_save::set_ene_filename(), STD_save::set_fstat_filename(), set_initial_pressures_for_pressure_controlled_walls(), setup_particles_initial_conditions(), Species, start_ene(), t, tmax, and wallHandler.
Referenced by ChuteBottom::make_rough_bottom(), and solve().
|
inline |
Read arguments before solving.
Definition at line 99 of file MD.h.
References readArguments(), and solve().
void MD::solveWithMDCLR | ( | ) |
Tries to solve the problem using MDCLR.
|
protectedvirtual |
Functions for ene file.
This function gathers statistical data.
todo{Why is there a +6 here?}
Definition at line 127 of file MD.cc.
References STD_save::ene_file, and get_append().
Referenced by solve(), and statistics_from_restart_data().
void MD::statistics_from_restart_data | ( | const char * | name | ) |
Loads all MD data and plots statistics for all timesteps in the .data file.
statistics_from_restart_data
todo{Check this whole function}
Definition at line 1890 of file MD.cc.
References actions_after_time_step(), actions_before_time_loop(), actions_before_time_step(), Check_and_Duplicate_Periodic_Particles(), compute_all_forces(), compute_particle_masses(), STD_save::data_file, STD_save::data_filename, HGRID_actions_before_time_loop(), HGRID_actions_before_time_step(), initialize_statistics(), load_from_data_file(), load_restart_data(), output_ene(), PeriodicCreated, Remove_Duplicate_Periodic_Particles(), save_data_data, save_data_ene, save_data_fstat, save_data_stat, start_ene(), STD_save::stat_file, STD_save::stat_filename, and t.
|
virtual |
Writes all MD data.
Reimplemented in ChuteWithHopper, ChuteWithHopperAndInset, Chute, and HGRID_base.
Definition at line 1985 of file MD.cc.
References WallHandler::begin(), BaseHandler< T >::begin(), boundaryHandler, dim, dt, WallHandler::end(), BaseHandler< T >::end(), BaseHandler< T >::getNumberOfObjects(), WallHandler::getNumberOfWalls(), gravity, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, STD_save::options_restart, particleHandler, STD_save::problem_name, save_count_data, save_count_ene, save_count_fstat, Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
Referenced by save_restart_data(), and HGRID_base::write().
|
virtual |
Writes all MD data.
Definition at line 2198 of file MD.cc.
References WallHandler::begin(), BaseHandler< T >::begin(), boundaryHandler, dim, dt, WallHandler::end(), BaseHandler< T >::end(), BaseHandler< T >::getNumberOfObjects(), WallHandler::getNumberOfWalls(), gravity, max_radius, STD_save::options_data, STD_save::options_ene, STD_save::options_fstat, particleHandler, STD_save::problem_name, save_count_data, Species, t, tmax, wallHandler, xmax, xmin, ymax, ymin, zmax, and zmin.
|
friend |
Definition at line 498 of file MD.h.
|
private |
Definition at line 720 of file MD.h.
Referenced by get_append(), set_append(), and solve().
|
private |
Definition at line 709 of file MD.h.
Referenced by Check_and_Duplicate_Periodic_Particles(), checkInteractionWithBoundaries(), do_integration_after_force_computation(), getBoundaryHandler(), load_par_ini_file(), print(), read(), read_v1(), read_v2(), solve(), write(), and write_v1().
|
private |
Definition at line 702 of file MD.h.
Referenced by constructor(), read(), read_next_from_data_file(), and read_v2().
|
private |
The dimension of the simulation.
Definition at line 660 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_dim(), output_xballs_data(), print(), read(), read_next_from_data_file(), read_v2(), set_dim(), write(), and write_v1().
|
private |
Definition at line 683 of file MD.h.
Referenced by compute_plastic_internal_forces(), get_do_stat_always(), set_do_stat_always(), and solve().
|
private |
These are numerical constants like the time step size.
Definition at line 671 of file MD.h.
Referenced by actions_before_time_loop(), compute_plastic_internal_forces(), constructor(), do_integration_after_force_computation(), do_integration_before_force_computation(), get_dt(), getTangentialSpring(), getTangentialSpringWall(), print(), read(), read_v1(), read_v2(), set_dt(), set_dt_by_mass(), set_number_of_saves_all(), set_number_of_saves_data(), set_number_of_saves_ene(), set_number_of_saves_fstat(), set_number_of_saves_stat(), solve(), write(), and write_v1().
|
private |
used in force calculations
Definition at line 690 of file MD.h.
Referenced by add_ene_ela(), compute_plastic_internal_forces(), get_ene_ela(), set_ene_ela(), and solve().
|
private |
Definition at line 699 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_format(), output_xballs_data(), and set_format().
|
private |
Gravitational acceleration.
Definition at line 663 of file MD.h.
Referenced by constructor(), get_gravity(), print(), read(), read_v1(), read_v2(), Chute::set_ChuteAngle(), set_gravity(), solve(), write(), and write_v1().
|
private |
Definition at line 665 of file MD.h.
Referenced by get_max_radius(), read_v1(), solve(), and write_v1().
|
private |
Definition at line 707 of file MD.h.
Referenced by broad_phase(), Check_and_Duplicate_Periodic_Particles(), checkInteractionWithBoundaries(), compute_all_forces(), compute_particle_masses(), constructor(), getLargestParticle(), getParticleHandler(), getSmallestParticle(), output_xballs_data(), print(), read(), read_next_from_data_file(), read_v1(), read_v2(), Remove_Duplicate_Periodic_Particles(), removeParticle(), reset_DeltaMax(), reset_TangentialSprings(), set_dt(), set_FixedParticles(), solve(), write(), and write_v1().
|
private |
Definition at line 722 of file MD.h.
Referenced by constructor(), Remove_Duplicate_Periodic_Particles(), solve(), and statistics_from_restart_data().
RNG MD::random |
Definition at line 515 of file MD.h.
Referenced by constructor(), Chute::create_bottom(), Chute::create_inflow_particle(), ChuteWithHopper::create_inflow_particle(), ChuteWithHopperAndInset::create_inflow_particle(), readNextArgument(), ChuteBottom::setup_particles_initial_conditions(), and solve().
|
private |
Definition at line 700 of file MD.h.
Referenced by get_restart_version(), read(), and set_restart_version().
|
private |
Definition at line 701 of file MD.h.
Referenced by get_restarted(), set_restarted(), and solve().
|
private |
Definition at line 721 of file MD.h.
Referenced by do_integration_after_force_computation(), do_integration_before_force_computation(), get_rotation(), set_rotation(), and solve().
|
private |
These are informations for saving.
Definition at line 675 of file MD.h.
Referenced by get_save_count_data(), print(), read(), read_v1(), read_v2(), set_number_of_saves_data(), set_save_count_all(), set_save_count_data(), solve(), write(), and write_v1().
|
private |
Definition at line 676 of file MD.h.
Referenced by get_save_count_ene(), print(), read(), read_v1(), read_v2(), set_number_of_saves_ene(), set_save_count_all(), set_save_count_ene(), solve(), and write().
|
private |
Definition at line 678 of file MD.h.
Referenced by get_save_count_fstat(), print(), read(), read_v1(), read_v2(), set_number_of_saves_fstat(), set_save_count_all(), set_save_count_fstat(), solve(), and write().
|
private |
Definition at line 677 of file MD.h.
Referenced by get_save_count_stat(), print(), read(), read_v1(), read_v2(), set_number_of_saves_stat(), set_save_count_all(), set_save_count_stat(), and solve().
|
private |
Definition at line 679 of file MD.h.
Referenced by get_save_data_data(), solve(), and statistics_from_restart_data().
|
private |
Definition at line 680 of file MD.h.
Referenced by compute_plastic_internal_forces(), get_save_data_ene(), solve(), and statistics_from_restart_data().
|
private |
Definition at line 681 of file MD.h.
Referenced by compute_plastic_internal_forces(), get_save_data_fstat(), solve(), and statistics_from_restart_data().
|
private |
Definition at line 682 of file MD.h.
Referenced by compute_plastic_internal_forces(), get_save_data_stat(), solve(), and statistics_from_restart_data().
|
private |
Definition at line 723 of file MD.h.
Referenced by constructor(), and save_restart_data().
|
protected |
These are the particle parameters like dissipation etc.
Definition at line 655 of file MD.h.
Referenced by add_Species(), compute_internal_forces(), compute_particle_masses(), compute_plastic_internal_forces(), compute_walls(), constructor(), Chute::create_inflow_particle(), ChuteWithHopper::create_inflow_particle(), ChuteWithHopperAndInset::create_inflow_particle(), Chute::get_collision_time(), get_collision_time(), get_depth(), get_dim_particle(), get_disp(), get_disprolling(), get_dispt(), get_disptorsion(), get_dissipation(), get_k(), get_k1(), get_k2max(), get_kc(), get_krolling(), get_kt(), get_ktorsion(), Chute::get_LightestParticleMass(), get_Mass_from_Radius(), get_maximum_velocity(), get_MixedSpecies(), get_mu(), get_murolling(), get_mutorsion(), get_NSpecies(), get_plastic_dt(), Chute::get_restitution_coefficient(), get_restitution_coefficient(), get_rho(), get_Species(), Chute::getLargestParticle(), Chute::getSmallestParticle(), Chute::initialize_inflow_particle(), print(), read(), read_next_from_data_file(), read_v1(), read_v2(), Chute::readNextArgument(), readNextArgument(), set_collision_time_and_normal_and_tangential_restitution_coefficient(), set_collision_time_and_normal_and_tangential_restitution_coefficient_nodispt(), Chute::set_collision_time_and_restitution_coefficient(), set_collision_time_and_restitution_coefficient(), set_depth(), set_dim_particle(), set_disp(), set_disprolling(), set_dispt(), set_disptorsion(), set_dissipation(), set_dt(), set_k(), set_k1(), set_k2max(), set_k_and_restitution_coefficient(), set_kc(), set_krolling(), set_kt(), set_ktorsion(), set_MixedSpecies(), set_mu(), set_murolling(), set_mutorsion(), set_plastic_k1_k2max_kc_depth(), set_rho(), ChuteBottom::setup_particles_initial_conditions(), solve(), write(), and write_v1().
|
private |
This stores the current time.
Definition at line 687 of file MD.h.
Referenced by compute_plastic_internal_forces(), cout_time(), find_next_data_file(), get_t(), getTangentialSpring(), getTangentialSpringWall(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_t(), StatisticsVector< T >::set_tintStat(), StatisticsVector< T >::set_tmaxStat(), StatisticsVector< T >::set_tminStat(), solve(), statistics_from_restart_data(), write(), and write_v1().
|
private |
Definition at line 672 of file MD.h.
Referenced by constructor(), cout_time(), get_tmax(), print(), read(), read_v1(), read_v2(), set_number_of_saves_all(), set_number_of_saves_data(), set_number_of_saves_ene(), set_number_of_saves_fstat(), set_number_of_saves_stat(), set_tmax(), solve(), write(), and write_v1().
|
private |
Definition at line 708 of file MD.h.
Referenced by compute_all_forces(), compute_walls(), getWallHandler(), load_par_ini_file(), print(), read(), read_v1(), read_v2(), solve(), write(), and write_v1().
|
private |
Definition at line 698 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xballs_additional_arguments(), and set_xballs_additional_arguments().
|
private |
Definition at line 695 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xballs_cmode(), set_xballs_cmode(), and set_xballs_colour_mode().
|
private |
Definition at line 697 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xballs_scale(), and set_xballs_scale().
|
private |
Definition at line 696 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xballs_vscale(), and set_xballs_vector_scale().
|
private |
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xmax(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_xmax(), set_xmin(), write(), and write_v1().
|
private |
These store the size of the domain, assume walls at the ends.
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_xmin(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_xmax(), set_xmin(), write(), and write_v1().
|
private |
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_ymax(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_ymax(), set_ymin(), write(), and write_v1().
|
private |
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_ymin(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_ymax(), set_ymin(), set_zmax(), write(), and write_v1().
|
private |
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_zmax(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_zmax(), set_zmin(), write(), and write_v1().
|
private |
Definition at line 668 of file MD.h.
Referenced by constructor(), create_xballs_script(), get_zmin(), output_xballs_data(), print(), read(), read_dim_from_data_file(), read_next_from_data_file(), read_v1(), read_v2(), set_zmax(), set_zmin(), write(), and write_v1().