PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A class to read input file. More...
#include <input.h>
Public Member Functions | |
Input (std::string filename="", bool createDefault=false) | |
Constructor. | |
Accessor methods | |
std::shared_ptr< inp::MaterialDeck > | getMaterialDeck () |
Get the pointer to material deck. | |
std::shared_ptr< inp::MeshDeck > | getMeshDeck () |
Get the pointer to mesh deck. | |
std::shared_ptr< inp::ModelDeck > | getModelDeck () |
Get the pointer to model deck. | |
std::shared_ptr< inp::OutputDeck > | getOutputDeck () |
Get the pointer to output deck. | |
std::shared_ptr< inp::RestartDeck > | getRestartDeck () |
Get the pointer to restart deck. | |
std::shared_ptr< inp::ParticleDeck > | getParticleDeck () |
Get the pointer to particle deck. | |
std::shared_ptr< inp::ContactDeck > | getContactDeck () |
Get the pointer to contact deck. | |
bool | isMultiParticle () |
Get particle simulation type. | |
bool | isPeriDEM () |
Specify if PeriDEM model should be run. | |
Private Member Functions | |
Setter methods | |
Reads input file into the respective decks | |
void | createDefaultInputConfiguration () |
Create default input configuration. | |
void | setMaterialDeck () |
Read data into material deck and store its pointer. | |
void | setMeshDeck () |
Read data into mesh deck and store its pointer. | |
void | setModelDeck () |
Read data into model deck and store its pointer. | |
void | setOutputDeck () |
Read data into output deck and store its pointer. | |
void | setRestartDeck () |
Read data into restart deck and store its pointer. | |
void | setParticleDeck () |
Read data into particle deck and store its pointer. | |
void | setZoneMaterialDeck (std::vector< std::string > s_config, inp::MaterialDeck *m_deck, size_t zone_id) |
Read data into material deck and store its pointer. | |
void | setZoneMeshDeck (std::vector< std::string > s_config, inp::MeshDeck *mesh_deck) |
Read data into mesh deck and store its pointer. | |
void | setZoneData (std::vector< std::string > s_config, inp::Zone *zone_data) |
Read zone data. | |
void | setParticleData (std::string string_zone, inp::ParticleZone *particle_data) |
Read particle data. | |
void | setContactDeck () |
Read data into particle deck and store its pointer. | |
Private Attributes | |
Internal data | |
std::string | d_inputFilename |
Name of input file. | |
bool | d_createDefault |
Specify if create defaul objects in Input. | |
Decks | |
std::shared_ptr< inp::MaterialDeck > | d_materialDeck_p |
Pointer to deck holding material related data. | |
std::shared_ptr< inp::MeshDeck > | d_meshDeck_p |
Pointer to deck holding geometry related data. | |
std::shared_ptr< inp::ModelDeck > | d_modelDeck_p |
Pointer to deck holding problem related data. | |
std::shared_ptr< inp::OutputDeck > | d_outputDeck_p |
Pointer to deck holding output related data. | |
std::shared_ptr< inp::RestartDeck > | d_restartDeck_p |
Pointer to deck holding restart related data such as restart filename and restart time step. | |
std::shared_ptr< inp::ParticleDeck > | d_particleDeck_p |
Pointer to deck holding particle related data. | |
std::shared_ptr< inp::ContactDeck > | d_contactDeck_p |
Pointer to deck holding particle related data. | |
A class to read input file.
In this class we read input file and read the data into various decks. Input file is a YAML file.
|
explicit |
Constructor.
filename | Filename of input file |
createDefault | If true creates default objects if filename is empty |
Definition at line 112 of file input.cpp.
References d_createDefault, d_inputFilename, setContactDeck(), setModelDeck(), setOutputDeck(), setParticleDeck(), and setRestartDeck().
|
private |
Create default input configuration.
std::shared_ptr< inp::ContactDeck > inp::Input::getContactDeck | ( | ) |
Get the pointer to contact deck.
Definition at line 183 of file input.cpp.
std::shared_ptr< inp::MaterialDeck > inp::Input::getMaterialDeck | ( | ) |
Get the pointer to material deck.
Definition at line 166 of file input.cpp.
std::shared_ptr< inp::MeshDeck > inp::Input::getMeshDeck | ( | ) |
Get the pointer to mesh deck.
Definition at line 169 of file input.cpp.
std::shared_ptr< inp::ModelDeck > inp::Input::getModelDeck | ( | ) |
Get the pointer to model deck.
Definition at line 172 of file input.cpp.
std::shared_ptr< inp::OutputDeck > inp::Input::getOutputDeck | ( | ) |
Get the pointer to output deck.
Definition at line 175 of file input.cpp.
std::shared_ptr< inp::ParticleDeck > inp::Input::getParticleDeck | ( | ) |
Get the pointer to particle deck.
Definition at line 181 of file input.cpp.
std::shared_ptr< inp::RestartDeck > inp::Input::getRestartDeck | ( | ) |
Get the pointer to restart deck.
Definition at line 178 of file input.cpp.
bool inp::Input::isMultiParticle | ( | ) |
Get particle simulation type.
bool inp::Input::isPeriDEM | ( | ) |
|
private |
Read data into particle deck and store its pointer.
Definition at line 665 of file input.cpp.
References util::isLess(), and inp::ContactPairDeck::printStr().
Referenced by Input().
|
private |
Read data into material deck and store its pointer.
Definition at line 915 of file input.cpp.
|
private |
Read data into mesh deck and store its pointer.
Definition at line 866 of file input.cpp.
|
private |
Read data into model deck and store its pointer.
Definition at line 189 of file input.cpp.
Referenced by Input().
|
private |
Read data into output deck and store its pointer.
Definition at line 998 of file input.cpp.
Referenced by Input().
|
private |
Read particle data.
string_zone | String associated with zone to get the data from YAML file |
particle_data | Pointer to particle data |
Definition at line 1278 of file input.cpp.
References util::geometry::GeomData::copyGeometry(), util::geometry::createGeomObject(), inp::ParticleZone::d_allDofsConstrained, inp::ParticleZone::d_createParticleUsingParticleZoneGeomObject, inp::ParticleZone::d_genMethod, util::geometry::GeomData::d_geom_p, inp::ParticleZone::d_isWall, inp::ParticleZone::d_nearBdNodesTol, inp::ParticleZone::d_particleFile, inp::ParticleZone::d_particleFileDataType, inp::ParticleZone::d_particleGeomData, and inp::ParticleZone::d_refParticleGeomData.
|
private |
Read data into particle deck and store its pointer.
Definition at line 292 of file input.cpp.
References util::geometry::createGeomObject(), and util::methods::isTagInList().
Referenced by Input().
|
private |
Read data into restart deck and store its pointer.
Definition at line 835 of file input.cpp.
Referenced by Input().
|
private |
Read zone data.
s_config | Config file to read data |
zone_data | Pointer to Zone object |
Definition at line 1244 of file input.cpp.
References util::geometry::createGeomObject(), util::geometry::GeomData::d_geom_p, and inp::Zone::d_zoneGeomData.
|
private |
Read data into material deck and store its pointer.
s_config | Config file to read data |
m_deck | Pointer to material deck |
zone_id | Id of zone |
Definition at line 1048 of file input.cpp.
References inp::MaterialDeck::d_bondPotentialParams, inp::MaterialDeck::d_bondPotentialType, inp::MaterialDeck::d_checkScFactor, inp::MaterialDeck::d_computeParamsFromElastic, inp::MaterialDeck::d_density, inp::MatData::d_E, inp::MatData::d_G, inp::MatData::d_Gc, inp::MaterialDeck::d_horizon, inp::MaterialDeck::d_horizonMeshRatio, inp::MaterialDeck::d_influenceFnParams, inp::MaterialDeck::d_influenceFnType, inp::MaterialDeck::d_irreversibleBondBreak, inp::MaterialDeck::d_isPlaneStrain, inp::MatData::d_K, inp::MatData::d_KIc, inp::MatData::d_lambda, inp::MaterialDeck::d_matData, inp::MaterialDeck::d_materialType, inp::MatData::d_mu, inp::MatData::d_nu, inp::MaterialDeck::d_stateContributionFromBrokenBond, inp::MaterialDeck::d_statePotentialParams, and inp::MaterialDeck::d_statePotentialType.
|
private |
Read data into mesh deck and store its pointer.
s_config | Config file to read data |
mesh_deck | Pointer to mesh deck |
Definition at line 1175 of file input.cpp.
References util::geometry::createGeomObject(), inp::MeshDeck::d_computeMeshSize, inp::MeshDeck::d_createMesh, inp::MeshDeck::d_createMeshGeomData, inp::MeshDeck::d_createMeshInfo, inp::MeshDeck::d_dim, inp::MeshDeck::d_filename, inp::MeshDeck::d_h, and inp::MeshDeck::d_spatialDiscretization.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |