MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Model.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef MODEL_H_
5#define MODEL_H_
6
7#include "Eigen/Core"
8using Eigen::Vector3d;
9
10#include<string>
11using std::string;
12
13#include <chrono>
14
17namespace ModelSetup {
18
22
53
57
61
65
69
73
77
80 void setLoadState(bool load_state_activated);
81
85
88 void setSaveState(bool save_state_activated);
89
93
96 double getTimeStep();
97
100 void setTimeStep(double time_step);
101
104 double getTime();
105
108 void setTime(double simulation_time);
109
112 unsigned getResultNum();
113
116 void setResultNum(unsigned total_results);
117
120 unsigned getResultSteps();
121
125
128 void setCriticalTimeStepMultiplier(double critical_time_step_multiplier);
129
132 unsigned getThreads();
133
136 void setThreads(unsigned n_threads);
137
141
144 void setContactActive(bool is_contact_activated);
145
149
152 void setSecondContactActive(bool is_contact_activated);
153
157
160 void setContactNormal(int normal_type);
161
165
168 void setGravityActive(bool is_gravity_activated);
169
173 const Vector3d& getGravity();
174
178 void setGravity(const Vector3d& gravity);
179
183
186 void setAxisymetricActive(bool if_axysimentric_active);
187
191
194 void setJanumannActive(bool if_jaumann_active);
195
198 string getInputFile();
199
202 void setInputFile(string file_name);
203
208
213
217
221
224 void setDampingLocalValue(double alpha);
225
229
233
238
243
246 void setNumThreads(unsigned nThreads);
247
251
254 void setSeismicAnalysisActive(bool seismic_analysis_active);
255
259
262 void setTwoPhaseActive(bool two_phase_calculation_active);
263
266 void setInitialSimulationTime( std::chrono::system_clock::time_point initialTime);
267
270 std::chrono::system_clock::time_point getInitialSimulationTime( );
271
273 std::string getSeismicFileName();
274
278
281 void setCurrentTime(double currentTime);
282
285
288
292
296
300
304
307 void setLoopCounter(int a);
308
312};
313
314#endif /* MODEL_H_ */
Contain the configuration variables that defines an specific simulation.
DampingType
Defines the type of damping used in the simulation.
Definition Model.h:48
@ UNDAMPED
No damping applied.
Definition Model.h:49
@ KINETIC_DYNAMIC_RELAXATION
Kinetic dynamic relaxation damping.
Definition Model.h:51
@ LOCAL
Local damping (requires "value")
Definition Model.h:50
bool getJanumannActive()
Return if Jaumann rate is active.
void setTerrainContactActive(bool)
Set terrain contact active.
bool getHydroMechOneWayEnabled()
Return if one way hydro-mechanical coupling is enabled.
void setAxisymetricActive(bool if_axysimentric_active)
Configure if axisymetric analisys is active.
bool getSecondContactActive()
Return if contact method is activated.
ModelSetup::DampingType getDampingType()
Return the damping type.
double getDampingLocal()
Return the local damping value.
void setLoopCounter(int a)
Set the current loop counter.
ModelSetup::StressUpdateScheme getUpdateStressScheme()
Return the scheme for updating the stress.
ModelSetup::DampingType getDamping()
Return the damping type.
bool getAxisymetricActive()
Return if axisymetric analisys is active.
bool getTwoPhaseActive()
Return if two-phase calculation is active.
unsigned getResultNum()
Return the total results to be written.
void setUpdateStressScheme(ModelSetup::StressUpdateScheme stress_sheme_update)
Configure the scheme for updating the stress.
double getTimeStep()
Return the time step.
bool getLinuxSystem()
Return true is the system is Linux.
void setHydroMechanicalCouplingType(HydroMechanicalCouplingType type)
Set hydro-mechanical coupling type.
std::chrono::system_clock::time_point getInitialSimulationTime()
Get initial simulation time.
unsigned getContributionNodesNum()
Return the number of nodes that a particle contributes.
std::string getSeismicFileName()
Return the seismic file name.
void setTwoPhaseActive(bool two_phase_calculation_active)
Configure if two-phase calculation is active.
bool getSaveState()
Return true is save state is activated.
void setTime(double simulation_time)
Configure the simulation time.
void setNumThreads(unsigned nThreads)
Configure the number of threads in the model.
void setSaveState(bool save_state_activated)
Set save state activated.
int incrementLoopCounter()
Increment the loop counter by one.
void setThreads(unsigned n_threads)
Configures the number of threads.
bool getContactNormal()
Return contact normal preference.
HydroMechanicalCouplingType
Defines the type of hydro-mechanical coupling.
Definition Model.h:64
bool getContactActive()
Return if contact method is activated.
unsigned getThreads()
Return the number of threads in the simulation.
bool getWindowsSystem()
Return true is the system is Windows.
HydroMechanicalCouplingType getHydroMechanicalCouplingType()
return the hydro-mechanical coupling type
unsigned getResultSteps()
Return the every how many steps the results will be written.
InterpolationFunctionType
Defines the type of interpolation function.
Definition Model.h:60
@ GIMP
Definition Model.h:60
@ LINEAR
Definition Model.h:60
int getLoopCounter()
Get the current loop counter.
void setInputFile(string file_name)
Configure the input file name.
void setCurrentTime(double currentTime)
Set current simulation time.
OperationalSystem
Defines the current operational system.
Definition Model.h:56
@ LINUX
Definition Model.h:56
@ WINDOWS
Definition Model.h:56
void setDampingType(ModelSetup::DampingType dampingType)
Configure the damping type.
StressUpdateScheme
Defines the type of scheme used to update the stress.
Definition Model.h:21
@ USL
Definition Model.h:21
@ MUSL
Definition Model.h:21
@ USF
Definition Model.h:21
void setTimeStep(double time_step)
Configure the time step.
double getTime()
Return the simulation time.
void setInitialSimulationTime(std::chrono::system_clock::time_point initialTime)
Set initial simulation time.
void setInterpolationFunction(ModelSetup::InterpolationFunctionType interpolation_functions_type)
Configure the interpolation functions type.
void setGravity(const Vector3d &gravity)
Configure the gravity vector.
double getCriticalTimeStepMultiplier()
Return the critical sime step multiplier.
void setSeismicAnalysisActive(bool seismic_analysis_active)
Configure if seismic analysis is active.
bool getGravityActive()
Return if gravity is active.
double getCurrentTime()
Get current simulation time.
void setGravityActive(bool is_gravity_activated)
Configure if gravity is active.
ModelSetup::InterpolationFunctionType getInterpolationFunction()
Return the interpolation functions type.
void setContactActive(bool is_contact_activated)
Configure if contact method is activated.
void setResultNum(unsigned total_results)
Configure the total results to be written.
void setSecondContactActive(bool is_contact_activated)
Configure if contact method is activated.
bool getTerrainContactActive()
Return if terrain contact is active.
void setCriticalTimeStepMultiplier(double critical_time_step_multiplier)
Configures the fraction of critical time step.
void setContactNormal(int normal_type)
Configure contact normal preference.
bool getSeismicAnalysisActive()
Return true if seismic analysis is active.
void setJanumannActive(bool if_jaumann_active)
Configure if Jaumann rate is active.
void setDampingLocalValue(double alpha)
Configure the local damping value.
void setLoadState(bool load_state_activated)
Set load state activated.
const Vector3d & getGravity()
Return the gravity vector.
string getInputFile()
Return the input file name.
bool getLoadState()
Return true is load state is activated.