NetDEM v1.0
Loading...
Searching...
No Matches
dem_solver.hpp
Go to the documentation of this file.
1#pragma once
2
4#include "dem_profiler.hpp"
5
6namespace netdem {
7
8class Simulation;
9class MPIManager;
10class ModifierManager;
11class Scene;
12
23class DEMSolver {
24public:
40
42 double timestep{1.0e-4};
43
47
51
53 DEMSolver();
54
66 void Init(Simulation *sim);
67
69 void UpdatePreModifiers();
70
72 void UpdateLinkedList();
73
75 void UpdateContacts();
76
79
82
85
87 void UpdateWallMotion();
88
91
102 void Cycle(int num_cycles);
103
114 void Solve(double time);
115
116private:
119 Simulation *sim{nullptr};
120
123 void UpdateMidModifiers(CyclePoint cyc_point);
124
126 void Cycle();
127
130 void DryCycle();
131
145 void SolveContactPP(Particle *const p_ii, NeighPofP *const neigh_tuple,
146 ContactSolverFactory *const solver_factory);
147
162 void SolveContactPW(Particle *const p_ii, NeighWofP *const neigh_tuple,
163 ContactSolverFactory *const solver_factory);
164};
165
166} // namespace netdem
A factory class for creating and managing contact solvers.
Definition contact_solver_factory.hpp:61
A profiler class for measuring performance metrics in a DEM simulation.
Definition dem_profiler.hpp:22
A solver class for performing discrete element method (DEM) simulations.
Definition dem_solver.hpp:23
void Solve(double time)
Solve the simulation for a certain amount of time.
Definition dem_solver.cpp:262
void UpdateWallMotion()
step 5
Definition dem_solver.cpp:207
void UpdateLinkedList()
step 1
Definition dem_solver.cpp:42
void UpdatePostModifiers()
step 6
Definition dem_solver.cpp:219
void UpdateContacts()
step 2
Definition dem_solver.cpp:110
double timestep
Definition dem_solver.hpp:42
void Cycle(int num_cycles)
Perform a given number of cycles of the simulation.
Definition dem_solver.cpp:235
void UpdateParticleMotion()
step 5
Definition dem_solver.cpp:195
CyclePoint
Definition dem_solver.hpp:27
@ mid_0
Definition dem_solver.hpp:29
@ mid_2
Definition dem_solver.hpp:31
@ pre
Definition dem_solver.hpp:28
@ mid_3
Definition dem_solver.hpp:33
@ mid_1
Definition dem_solver.hpp:30
@ num_cycle_points
Definition dem_solver.hpp:38
@ mid_4
Definition dem_solver.hpp:35
@ post
Definition dem_solver.hpp:37
void Init(Simulation *sim)
Initialize the solver with a given simulation object.
Definition dem_solver.cpp:16
void UpdateWallContactForce()
step 4
Definition dem_solver.cpp:183
void UpdateParticleContactForce()
step 3
Definition dem_solver.cpp:171
DEMProfiler dem_profiler
Definition dem_solver.hpp:46
DEMSolver()
Definition dem_solver.cpp:14
void UpdatePreModifiers()
step 0
Definition dem_solver.cpp:19
ContactSolverFactory contact_solver_factory
Definition dem_solver.hpp:50
A class representing a particle in contact with another particle or wall.
Definition neigh_tuple.hpp:25
A class representing a wall in contact with a particle.
Definition neigh_tuple.hpp:99
Definition particle.hpp:26
Class for managing a DEM simulation.
Definition simulation.hpp:21
Definition bond_entry.hpp:7