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
518
522
525 double getTimeStep();
526
529 double getTimeStep();
530
534
540
544
547 Vector3i getCellsNum();
548
552
555 Vector3d getOrigin();
556
559 vector<Material*> getMaterialList();
560
563 vector<Body*> getBodyList(const vector<Material*>* );
564
567 vector<Contact*> getContactList();
568
571 Vector3d getGravity();
572
576
580
583 vector<string> getResultFields();
584
586 vector<string> getGridResultFields();
587
589 vector<string> getWriteSTLMeshFields();
590
594
598
602 vector<Boundary::BoundaryType> getMeshBoundaryConditions();
603
605 std::string getSTLMeshFile();
606
610 vector<Boundary::BoundaryType> getMeshBoundaryConditionsFluid();
611
614 unsigned getNumThreads();
615
618 unsigned getNumberPhases();
619
622 vector<Loads::LoadDistributedBox> getLoadDistributedBox();
623
629
632 vector<Loads::PressureBox> getPrescribedPressureBox();
633
636 vector<Loads::PressureBox> getInitialPressureBox();
637
640 vector<Loads::PressureMaterial> getInitialPressureMaterial();
641
644 vector<Loads::PressureBoundaryForceBox> getPressureBoundaryForceBox();
645
648 SeismicData readSeismicData(const std::string& filename, bool hasHeader);
649
653
656
660
663
667
671
674
678
681
684
687
691
695
699
703};
704
705#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 getKeepPreviousResults()
Keeps previous results.
bool getLoadState()
Return load state activated.
string getLoadStateFileName()
Return state file name.
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.
string getSaveStateFileName()
Return save state 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