![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Structure to read and store model related input data. More...
#include <modelDeck.h>
Public Member Functions | |
| ModelDeck (const json &j=json({})) | |
| Constructor. | |
| ModelDeck (size_t dim, double tFinal=1.0, size_t Nt=10, std::string spatialDiscretization="finite_difference", std::string timeDiscretization="central_difference", bool populateElementNodeConnectivity=true, size_t quadOrder=2, std::string particleSimType="Multi_Particle", int seed=0) | |
| void | readFromJson (const json &j) |
| Reads from json object. | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the object. | |
Static Public Member Functions | |
| static const std::vector< Field< ModelDeck > > & | fields () |
| Returns example JSON object for ModelDeck configuration. | |
| static json | getExampleJson (const json &given=json::object()) |
| Returns the block with the given fields set. | |
Data Fields | |
| std::string | d_simType |
| Simulation type. | |
| bool | d_isRestartActive |
| Flag indicating if this restart problem. | |
| std::string | d_spatialDiscretization |
| Tag for spatial discretization. | |
| std::string | d_timeDiscretization |
| Tag for time discretization. | |
| bool | d_populateElementNodeConnectivity |
| Flag to indicate if we should populate element-node connectivity data in meshes. | |
| size_t | d_quadOrder |
| Order of quadrature approximation for strain and stress computation (default is 1) | |
| std::string | d_particleSimType |
| Specify if this is single or multi particle simulation Expected value is either 'Single_Particle' or 'Multi_Particle'. | |
| std::string | d_mpiStrategy |
| MPI domain-decomposition strategy (independent of Particle_Sim_Type). | |
| std::string | d_bondBreak |
Bond failure criterion: tension (default) or absolute_stretch. | |
| std::vector< std::pair< size_t, double > > | d_rigidParticles |
Rigid translating particles: {"Id": <id>, "Mass": <mass>}. Nodal force densities are set to density * (net force / Mass). | |
| std::string | d_selfContact |
Intra-body self-contact law name (default broken_bond_kn). | |
| std::string | d_wallContact |
Wall contact representation: meshed (default) or analytical_plane. | |
| size_t | d_dim |
| Dimension. | |
| double | d_tFinal |
| Final simulation time. | |
| double | d_dt |
| Size of time steps. | |
| size_t | d_Nt |
| Number of time steps. | |
| int | d_seed |
| Seed for random calculations (if any) | |
Structure to read and store model related input data.
Definition at line 27 of file modelDeck.h.
Constructor.
Definition at line 125 of file modelDeck.h.
|
inline |
Definition at line 135 of file modelDeck.h.
References d_dt, d_Nt, d_simType, d_tFinal, and d_timeDiscretization.
Returns example JSON object for ModelDeck configuration.
The fields of this deck, declared once
Reading, writing, printing and the schema are generated from this table. The discretization block, the simulation type it implies, the time step and the rigid particles are read in readDerived.
Definition at line 177 of file modelDeck.h.
References d_bondBreak, d_dim, d_mpiStrategy, d_Nt, d_particleSimType, d_populateElementNodeConnectivity, d_quadOrder, d_seed, d_selfContact, d_tFinal, d_wallContact, and inp::field().
Referenced by getExampleJson(), printStr(), and readFromJson().
Returns the block with the given fields set.
| given | Field names and values to set, checked against the table |
Definition at line 217 of file modelDeck.h.
References inp::applyGiven(), and fields().
Referenced by anonymous_namespace{main.cpp}::buildBhatInputJson(), anonymous_namespace{main.cpp}::buildImpactInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildTraskInputJson(), anonymous_namespace{testMeshGen.cpp}::builtinMeshCheckForGeometry(), getInputJson(), anonymous_namespace{main.cpp}::makeDeck(), and anonymous_namespace{testDeckRoundTrip.cpp}::testModelDeck().
|
inline |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 293 of file modelDeck.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 270 of file modelDeck.h.
References d_dt, d_isRestartActive, d_simType, d_spatialDiscretization, d_timeDiscretization, fields(), util::io::getTabS(), and inp::printFields().
Referenced by print().
|
inline |
Reads from json object.
Definition at line 229 of file modelDeck.h.
References d_dt, d_Nt, d_rigidParticles, d_simType, d_spatialDiscretization, d_tFinal, d_timeDiscretization, fields(), and inp::readFields().
Referenced by anonymous_namespace{testDeckRoundTrip.cpp}::testModelDeck().
| std::string inp::ModelDeck::d_bondBreak |
Bond failure criterion: tension (default) or absolute_stretch.
Definition at line 89 of file modelDeck.h.
Referenced by fields().
| size_t inp::ModelDeck::d_dim |
Dimension.
Definition at line 108 of file modelDeck.h.
Referenced by mesh_gen::createParticleMesh(), fields(), mesh_gen::generateBuiltinParticleMeshGmsh(), mesh_gen::gmshMeshGenerateDim(), mesh::Mesh::loadFromTetraElements3D(), and mesh::Mesh::loadFromTriangleElements2D().
| double inp::ModelDeck::d_dt |
Size of time steps.
Definition at line 114 of file modelDeck.h.
Referenced by ModelDeck(), printStr(), and readFromJson().
| bool inp::ModelDeck::d_isRestartActive |
Flag indicating if this restart problem.
Definition at line 38 of file modelDeck.h.
Referenced by printStr().
| std::string inp::ModelDeck::d_mpiStrategy |
MPI domain-decomposition strategy (independent of Particle_Sim_Type).
Allowed: auto (default), none, particle, dof.
Definition at line 84 of file modelDeck.h.
Referenced by fields().
| size_t inp::ModelDeck::d_Nt |
Number of time steps.
Definition at line 117 of file modelDeck.h.
Referenced by fields(), ModelDeck(), and readFromJson().
| std::string inp::ModelDeck::d_particleSimType |
Specify if this is single or multi particle simulation Expected value is either 'Single_Particle' or 'Multi_Particle'.
This flag is used to populate input deck data. For the case when we consider single particle and its deformation, one do not have to specify data such as zones and contact.
Definition at line 73 of file modelDeck.h.
Referenced by fields().
| bool inp::ModelDeck::d_populateElementNodeConnectivity |
Flag to indicate if we should populate element-node connectivity data in meshes.
Definition at line 62 of file modelDeck.h.
Referenced by fields(), mesh::Mesh::loadFromTetraElements3D(), and mesh::Mesh::loadFromTriangleElements2D().
| size_t inp::ModelDeck::d_quadOrder |
Order of quadrature approximation for strain and stress computation (default is 1)
Definition at line 65 of file modelDeck.h.
Referenced by fields().
| std::vector<std::pair<size_t, double> > inp::ModelDeck::d_rigidParticles |
Rigid translating particles: {"Id": <id>, "Mass": <mass>}. Nodal force densities are set to density * (net force / Mass).
Definition at line 95 of file modelDeck.h.
Referenced by readFromJson().
| int inp::ModelDeck::d_seed |
Seed for random calculations (if any)
Definition at line 120 of file modelDeck.h.
Referenced by fields().
| std::string inp::ModelDeck::d_selfContact |
Intra-body self-contact law name (default broken_bond_kn).
Definition at line 100 of file modelDeck.h.
Referenced by fields().
| std::string inp::ModelDeck::d_simType |
Simulation type.
List of allowed values are:
Definition at line 35 of file modelDeck.h.
Referenced by ModelDeck(), printStr(), and readFromJson().
| std::string inp::ModelDeck::d_spatialDiscretization |
Tag for spatial discretization.
List of allowed values are:
Definition at line 49 of file modelDeck.h.
Referenced by mesh::Mesh::loadFromTetraElements3D(), mesh::Mesh::loadFromTriangleElements2D(), printStr(), and readFromJson().
| double inp::ModelDeck::d_tFinal |
Final simulation time.
Definition at line 111 of file modelDeck.h.
Referenced by fields(), ModelDeck(), and readFromJson().
| std::string inp::ModelDeck::d_timeDiscretization |
Tag for time discretization.
List of allowed values are:
Definition at line 59 of file modelDeck.h.
Referenced by ModelDeck(), printStr(), and readFromJson().
| std::string inp::ModelDeck::d_wallContact |
Wall contact representation: meshed (default) or analytical_plane.
Definition at line 105 of file modelDeck.h.
Referenced by fields().