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();
556
559 Vector3d getGravity();
560
564
567 vector<string> getResultFields();
568
569 vector<string> getGridResultFields();
570
574
578
582 vector<Boundary::BoundaryType> getMeshBoundaryConditions();
583
585 std::string getSTLMeshFile();
586
590 vector<Boundary::BoundaryType> getMeshBoundaryConditionsFluid();
591
594 unsigned getNumThreads();
595
598 unsigned getNumberPhases();
599
602 vector<Loads::LoadDistributedBox> getLoadDistributedBox();
603
609
612 vector<Loads::PressureBox> getPrescribedPressureBox();
613
616 vector<Loads::PressureBox> getInitialPressureBox();
617
620 vector<Loads::PressureMaterial> getInitialPressureMaterial();
621
624 vector<Loads::PressureBoundaryForceBox> getPressureBoundaryForceBox();
625
628 SeismicData readSeismicData(const std::string& filename, bool hasHeader);
629
633
637
640
644
648
651
654
658
662
666};
667
668#endif /* INPUT_H_ */
nlohmann::json json
Definition Input.h:11
Represents the operations to solve the equations in time.
Definition Solver.h:18
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< Boundary::BoundaryType > getMeshBoundaryConditionsFluid()
Return the mesh boundary conditions of fluid.
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.
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()
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.
bool getWriteSTLMeshFile()
Return if the STL mesh file should be written.
unsigned getNumThreads()
Return number of threads defined in the input file.
double getDampingValue()
Read the damping value.
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.
void readInputFile(string file_name)
Read the input file.
int getResultNum()
Return the number of results.
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.
vector< Body * > getBodyList()
Return the body list.
string getFileName()
Return the file name.
bool getSaveState()
Return save state activated.
DampingType
Defines the type of damping.
Definition Model.h:25
InterpolationFunctionType
Defines the type of interpolation function.
Definition Model.h:64
Definition Loads.h:32
Structure to hold seismic analysis information.
Definition Seismic.h:45
Stores seismic time series data.
Definition Seismic.h:27