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
26
57
61
65
69
73
77
81
84 void setLoadState(bool load_state_activated);
85
89
92 void setSaveState(bool save_state_activated);
93
97
100 double getTimeStep();
101
104 void setTimeStep(double time_step);
105
108 double getTime();
109
112 void setTime(double simulation_time);
113
116 unsigned getResultNum();
117
120 void setResultNum(unsigned total_results);
121
124 unsigned getResultSteps();
125
129
132 void setCriticalTimeStepMultiplier(double critical_time_step_multiplier);
133
136 unsigned getThreads();
137
140 void setThreads(unsigned n_threads);
141
145
148 void setContactActive(bool is_contact_activated);
149
153
156 void setGravityActive(bool is_gravity_activated);
157
161 const Vector3d& getGravity();
162
166 void setGravity(const Vector3d& gravity);
167
171
174 void setAxisymetricActive(bool if_axysimentric_active);
175
179
182 void setJanumannActive(bool if_jaumann_active);
183
186 string getInputFile();
187
190 void setInputFile(string file_name);
191
196
201
205
209
212 void setDampingLocalValue(double alpha);
213
217
221
226
231
234 void setNumThreads(unsigned nThreads);
235
239
242 void setSeismicAnalysisActive(bool seismic_analysis_active);
243
247
250 void setTwoPhaseActive(bool two_phase_calculation_active);
251
254 void setInitialSimulationTime( std::chrono::system_clock::time_point initialTime);
255
258 std::chrono::system_clock::time_point getInitialSimulationTime( );
259
261 std::string getSeismicFileName();
262
266
269 void setCurrentTime(double currentTime);
270
273
276
280
284
288
292
295 void setLoopCounter(int a);
296
300};
301
302#endif /* MODEL_H_ */
Contain the configuration variables that defines an specific simulation.
DampingType
Defines the type of damping.
Definition Model.h:25
@ UNDAMPED
No damping applied.
Definition Model.h:25
@ KINETIC_DYNAMIC_RELAXATION
Kinetic dynamic relaxation damping.
Definition Model.h:25
@ LOCAL
Local damping (requires "value")
Definition Model.h:25
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.
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.
HydroMechanicalCouplingType
Defines the type of hydro-mechanical coupling.
Definition Model.h:68
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:64
@ GIMP
Definition Model.h:64
@ LINEAR
Definition Model.h:64
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:60
@ LINUX
Definition Model.h:60
@ WINDOWS
Definition Model.h:60
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.
bool getTerrainContactActive()
Return if terrain contact is active.
void setCriticalTimeStepMultiplier(double critical_time_step_multiplier)
Configures the fraction of critical time step.
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.