NetDEM v1.0
Loading...
Searching...
No Matches
simulation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "dem_solver.hpp"
4#include "domain_manager.hpp"
5#include "input_processor.hpp"
7#include "mpi_manager.hpp"
8#include "scene.hpp"
9#include <string>
10
16namespace netdem {
17
22public:
27
32
37
43
48
54
58 double mech_time{0};
59
65
69 bool enable_logging{true};
70
74 Simulation();
75
79 void Init();
80
89 void AutoReadRestart(std::string const &path, int mech_cyc,
90 int shape_info_case = 0);
91
99 void SetTimeAndCycles(double t, int cycs);
100
106 void Run(double time);
107
111 ~Simulation();
112};
113
114} // namespace netdem
A solver class for performing discrete element method (DEM) simulations.
Definition dem_solver.hpp:23
A class that manages the domain and sub-domains for a DEM simulation.
Definition domain_manager.hpp:18
A class that processes input JSON files to modify a simulation.
Definition input_processor.hpp:20
Manages the data exchange in a DEM simulation.
Definition mpi_manager.hpp:39
A class used to manage modifiers in a simulation.
Definition modifier_manager.hpp:18
A class for managing the elements in a DEM simulation. Scene behaves as a std container:
Definition scene.hpp:56
Class for managing a DEM simulation.
Definition simulation.hpp:21
DEMSolver dem_solver
Implements DEM algorithms to solve the scene.
Definition simulation.hpp:47
void Init()
Initializes the simulation with default settings.
Definition simulation.cpp:9
MPIManager mpi_manager
Manages data exchange between sub-domains.
Definition simulation.hpp:36
void Run(double time)
Runs the simulation for a specified period of time.
Definition simulation.cpp:28
DomainManager domain_manager
Manager for domain and sub-domain calculations.
Definition simulation.hpp:31
Simulation()
Constructor for the Simulation class.
Definition simulation.cpp:7
void AutoReadRestart(std::string const &path, int mech_cyc, int shape_info_case=0)
Restarts the simulation using output files.
Definition simulation.cpp:18
~Simulation()
Destructor for the Simulation class.
Definition simulation.cpp:38
ModifierManager modifier_manager
Manages add-on features (i.e., customized evaluations not hard-coded in the DEM calculation cycle).
Definition simulation.hpp:53
double mech_time
The mechanical time in the simulation world.
Definition simulation.hpp:58
int mech_cycles
The mechanical cycles. Each cycle accounts for a [timestep] time increment of the simulation mechanic...
Definition simulation.hpp:64
InputProcessor input_processor
Object for processing input commands defined in a JSON file.
Definition simulation.hpp:26
void SetTimeAndCycles(double t, int cycs)
Sets the current time and cycles (usually invoked after AutoReadRestart).
Definition simulation.cpp:23
bool enable_logging
If true, output log information onto screen.
Definition simulation.hpp:69
Scene scene
Contains and manages basic DEM objects (e.g., shapes, particles, walls) for a DEM simulation.
Definition simulation.hpp:42
Definition bond_entry.hpp:7