![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Structure to read and store particle generation data, such as particle locations and group file. More...
#include <pGenDeck.h>
Public Member Functions | |
| PGenDeck (const json &j=json({})) | |
| Constructor. | |
| PGenDeck (std::string genMethod, json pGenJson=json({}), bool genWithRandomRotation=true) | |
| Constructor. | |
| void | readFromJson (const json &j) |
| Reads from json object. | |
| json | writeToJson () const |
| Returns this deck as a 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< PGenDeck > > & | fields () |
| Returns example JSON object for ModelDeck configuration. | |
| static json | getExampleJson (const json &given=json::object()) |
| Returns the block with the given fields set. | |
| static json | getExampleJson (const std::string &)=delete |
| Rejects a value given where a set of named values is expected. | |
| static json | getExampleJson (const char *)=delete |
| Rejects a value given where a set of named values is expected. | |
Data Fields | |
| std::string | d_genMethod |
| Particle generation method. | |
| json | d_pGenJson |
| Json object loaded from the input json file or jason file for particle generation. | |
| bool | d_genWithRandomRotation |
| Random rotation of particles if orientation is not provided. | |
Structure to read and store particle generation data, such as particle locations and group file.
Definition at line 28 of file pGenDeck.h.
Constructor.
Definition at line 49 of file pGenDeck.h.
|
inline |
Constructor.
Definition at line 58 of file pGenDeck.h.
Returns example JSON object for ModelDeck configuration.
Definition at line 66 of file pGenDeck.h.
References d_genMethod, d_genWithRandomRotation, and inp::field().
Referenced by getExampleJson(), printStr(), readFromJson(), and writeToJson().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A string converts to a JSON string, which would otherwise bind to the overload above and be read as a block with no keys. Deleting these makes that a compile error rather than a failure when the deck is built.
Returns the block with the given fields set.
| given | Field names and values to set, checked against the table |
Definition at line 82 of file pGenDeck.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(), getInputJson(), inp::ParticleDeck::getParticleGenExampleJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testNeighborAndGenDecks().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A string converts to a JSON string, which would otherwise bind to the overload above and be read as a block with no keys. Deleting these makes that a compile error rather than a failure when the deck is built.
|
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 162 of file pGenDeck.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 135 of file pGenDeck.h.
References d_pGenJson, fields(), util::io::getTabS(), and inp::printFields().
Referenced by print(), and inp::ParticleDeck::printStr().
|
inline |
Reads from json object.
| j | JSON object |
Definition at line 102 of file pGenDeck.h.
References d_genMethod, d_pGenJson, fields(), and inp::readFields().
Referenced by inp::ParticleDeck::readParticleGenFromJson().
|
inline |
Returns this deck as a JSON object.
Definition at line 120 of file pGenDeck.h.
References d_genMethod, d_pGenJson, fields(), and inp::writeFields().
| std::string inp::PGenDeck::d_genMethod |
Particle generation method.
"From_File" means particle location, radius and other details will be loaded from the input json file. Use key 'Particle_Generation' to provide the data.
"Use_Particle_Geometry" means particle geometry will be used to generate particles.
Definition at line 38 of file pGenDeck.h.
Referenced by fields(), readFromJson(), and writeToJson().
| bool inp::PGenDeck::d_genWithRandomRotation |
Random rotation of particles if orientation is not provided.
Definition at line 44 of file pGenDeck.h.
Referenced by fields().
| json inp::PGenDeck::d_pGenJson |
Json object loaded from the input json file or jason file for particle generation.
Definition at line 41 of file pGenDeck.h.
Referenced by printStr(), readFromJson(), and writeToJson().