![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Structure to read and store restart related data input. More...
#include <restartDeck.h>
Public Member Functions | |
| RestartDeck (std::string file, size_t step=0, bool changeRefFreeDofs=false) | |
| Constructor. | |
| RestartDeck (const json &j=json({})) | |
| 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< RestartDeck > > & | 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_file |
| restart filename | |
| size_t | d_step |
| Restart time step. | |
| bool | d_changeRefFreeDofs |
| Change only those particles/walls which have any one of its nodes dof free. | |
Structure to read and store restart related data input.
Definition at line 26 of file restartDeck.h.
|
inline |
Constructor.
Definition at line 41 of file restartDeck.h.
Constructor.
Definition at line 47 of file restartDeck.h.
|
inlinestatic |
Returns example JSON object for ModelDeck configuration.
Definition at line 57 of file restartDeck.h.
References d_changeRefFreeDofs, d_file, d_step, and inp::field().
Referenced by getExampleJson(), printStr(), readFromJson(), and writeToJson().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A file name passed on its own would convert to a JSON string and be read as a block with no keys, so such a call is rejected when compiling.
Returns the block with the given fields set.
A restart is requested by naming a file. Without one the block is empty, and the model starts from the initial condition.
| given | Field names and values to set, checked against the table |
Definition at line 79 of file restartDeck.h.
References inp::applyGiven(), and fields().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A file name passed on its own would convert to a JSON string and be read as a block with no keys, so such a call is rejected when compiling.
|
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 140 of file restartDeck.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 124 of file restartDeck.h.
References fields(), util::io::getTabS(), and inp::printFields().
Referenced by print().
|
inline |
Reads from json object.
| j | JSON object |
Definition at line 101 of file restartDeck.h.
References fields(), and inp::readFields().
|
inline |
Returns this deck as a JSON object.
Definition at line 111 of file restartDeck.h.
References fields(), and inp::writeFields().
| bool inp::RestartDeck::d_changeRefFreeDofs |
Change only those particles/walls which have any one of its nodes dof free.
Definition at line 36 of file restartDeck.h.
Referenced by fields().
| std::string inp::RestartDeck::d_file |
| size_t inp::RestartDeck::d_step |