MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Input.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 INPUT_H_
5#define INPUT_H_
6
7#include <string>
8using std::string;
9
10#include "Json/json.hpp"
11using json = nlohmann::json;
12
13#include "Eigen/Core"
14using Eigen::Vector3i;
15using Eigen::Vector3d;
16
17#include "Solver/Solver.h"
18#include "Materials/Material.h"
19#include "Model.h"
20#include "Boundary.h"
21#include "Loads.h"
22#include "Seismic.h"
23
39
48
57
80
87
106
115
138
144
166
188
202
211
221
226
232
240
246
258
263
269
275
281
289
295
314
335
347
354
363
381
395
405
470
488
489namespace Input {
490
493 void readInputFile(string file_name);
494
497 const json& getJson();
498
501 string getFileName();
502
506
510
514
517 double getTimeStep();
518
521 double getTimeStep();
522
526
532
536
539 Vector3i getCellsNum();
540
544
547 Vector3d getOrigin();
548
551 vector<Material*> getMaterialList();
552
555 vector<Body*> getBodyList(const vector<Material*>* );
556
559 vector<Contact*> getContactList();
560
563 Vector3d getGravity();
564
568
571 vector<string> getResultFields();
572
574 vector<string> getGridResultFields();
575
577 vector<string> getWriteSTLMeshFields();
578
582
586
590 vector<Boundary::BoundaryType> getMeshBoundaryConditions();
591
593 std::string getSTLMeshFile();
594
598 vector<Boundary::BoundaryType> getMeshBoundaryConditionsFluid();
599
602 unsigned getNumThreads();
603
606 unsigned getNumberPhases();
607
610 vector<Loads::LoadDistributedBox> getLoadDistributedBox();
611
617
620 vector<Loads::PressureBox> getPrescribedPressureBox();
621
624 vector<Loads::PressureBox> getInitialPressureBox();
625
628 vector<Loads::PressureMaterial> getInitialPressureMaterial();
629
632 vector<Loads::PressureBoundaryForceBox> getPressureBoundaryForceBox();
633
636 SeismicData readSeismicData(const std::string& filename, bool hasHeader);
637
641
644
648
651
655
659
662
666
669
672
675
679
683
687
691};
692
693#endif /* INPUT_H_ */
nlohmann::json json
Definition Input.h:11
Represents the operations to solve the equations in time.
Definition Solver.h:19
Operations to read the input file.
vector< Material * > getMaterialList()
Return the material list.
unsigned getNumberPhases()
Return the number of phases in the simulation.
Solver * getSolver()
Return the solver to be used in the model.
bool getLoadState()
Return load state activated.
vector< Loads::PressureBox > getPrescribedPressureBox()
Return prescribed pressure in particles inside a box.
double getCriticalTimeStepMultiplier()
Return critical time step multiplier.
vector< Contact * > getContactList()
Return the contact list.
vector< Boundary::BoundaryType > getMeshBoundaryConditionsFluid()
Return the mesh boundary conditions of fluid.
int getMasterBodyId()
Return the master id for contact analysis.
vector< Loads::LoadDistributedBox > getLoadDistributedBox()
Return loads distributed in particles inside a box.
bool getTerrainContactActive()
Return the terrain contact active.
const json & getJson()
Return the data file structure.
double RealDistanceCorrectionCoefficient()
Return the distance threshold for contact detection.
Vector3d getGravity()
Return the gravity force.
Loads::NodalPointLoadData readNodalPointLoads()
read nodal point loads This function reads a points from input file in the following format: "nodal_p...
vector< Boundary::BoundaryType > getMeshBoundaryConditions()
Return the mesh boundary conditions.
vector< string > getGridResultFields()
Return the grid result fields to be written.
SeismicAnalysis getSeismicAnalysisInfo()
Return the seismic analysis information.
std::string getPorePressureFilename()
Return the pore pressure filename.
bool getHydroMechCouplingEnabled()
Return the hydro-mechanical coupling enabled.
Vector3i getCellsNum()
Return the number of cells in each direction.
vector< string > getResultFields()
Return the fields to be written.
double getFrictionCoefficient()
Return the friction coefficient.
double getTimeStep()
Return the time step.
Vector3d getOrigin()
Return the origin of coordinates.
double getSimulationTime()
Return the simulation time.
unsigned getNumThreads()
Return number of threads defined in the input file.
string getContactNormalType()
Return the contact normal type flag for the simulation.
bool getContactActive()
Return the contact active.
double getDampingValue()
Read the damping value.
double getFrictionCoefficientContact()
Return the friction coefficient for contact analysis.
std::string getSTLMeshFile()
Return the name of the SLT mesh for terrain contact.
vector< Loads::PressureBoundaryForceBox > getPressureBoundaryForceBox()
Return pore pressure force in particles inside a box.
bool getPenaltyContactActive()
Return if the penalty contact is active.
vector< Loads::PressureBox > getInitialPressureBox()
Return initial pore pressure in particles inside a box.
ModelSetup::InterpolationFunctionType getInterpolationFunction()
Return the interpolation functions type.
bool getHydroMechCouplingOneWay()
Return the hydro-mechanical coupling type.
Vector3d getCellDimension()
Return the cell dimension.
double getPenaltyStiffness()
Return the penalty stiffness.
vector< string > getWriteSTLMeshFields()
Return the STL mesh files to be written.
int getSlaveBodyId()
Return the slave id for contact analysis.
void readInputFile(string file_name)
Read the input file.
int getResultNum()
Return the number of results.
vector< Body * > getBodyList(const vector< Material * > *)
Return the body list.
double getDistanceThreshold()
Return the distance threshold for contact detection.
ModelSetup::DampingType getDampingType()
Read the damping definition in the input file.
vector< Loads::PressureMaterial > getInitialPressureMaterial()
Return initial pore pressure in particles by material id.
SeismicData readSeismicData(const std::string &filename, bool hasHeader)
Return the seismic data.
string getFileName()
Return the file name.
bool getSaveState()
Return save state activated.
DampingType
Defines the type of damping used in the simulation.
Definition Model.h:48
InterpolationFunctionType
Defines the type of interpolation function.
Definition Model.h:60
Definition Loads.h:32
Structure to hold seismic analysis information.
Definition Seismic.h:45
Stores seismic time series data.
Definition Seismic.h:27