![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Structure to read and store material related data. More...
#include <materialDeck.h>
Public Member Functions | |
| MaterialDeck (const json &j=json({})) | |
| Constructor. | |
| MaterialDeck (std::string materialType, bool isPlainStrain=false, double horizon=-1., double horizonMeshRatio=-1., double density=1., double K=0., double G=0., double Gc=0., bool computeParamsFromElastic=true, size_t influenceFnType=0) | |
| Constructor. | |
| MaterialDeck (const MaterialDeck &md) | |
| Copy constructor. | |
| 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< MaterialDeck > > & | fields () |
| The fields of the block itself. | |
| static const std::vector< Field< MaterialDeck > > & | influenceFields () |
| The fields of the Influence_Function sub-block. | |
| static const std::vector< OneOf > & | groups () |
| Quantities this deck accepts in more than one form. | |
| static json | getExampleJson (const json &given=json::object()) |
| Returns example JSON object for ModelDeck configuration. | |
| 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 | |
| bool | d_isPlaneStrain |
| Indicates if the 2-d simulation is of plane-strain type (thick material) or plane-stress type (thin material) | |
| std::string | d_materialType |
| Material type. | |
| size_t | d_bondPotentialType |
| Type of pairwise (bond-based) potential. | |
| size_t | d_statePotentialType |
| Type of hydrostatic (state-based) potential. | |
| size_t | d_influenceFnType |
| Type of influence function. | |
| std::vector< double > | d_bondPotentialParams |
| List of parameters for pairwise potential. | |
| std::vector< double > | d_statePotentialParams |
| List of parameters for hydrostatic potential. | |
| std::vector< double > | d_influenceFnParams |
| List of parameters for influence function. | |
| bool | d_irreversibleBondBreak |
| Flag for irreversible breaking of bonds. | |
| bool | d_stateContributionFromBrokenBond |
| Flag for contribution to hydrostatic force from the broken bond. | |
| double | d_checkScFactor |
| Factor to check if bond is broken. | |
| bool | d_computeParamsFromElastic |
| Compute Peridynamic material properties from elastic properties. | |
| inp::MatData | d_matData |
| List of elastic and fracture properties. | |
| double | d_density |
| Density of material. | |
| double | d_horizon |
| Horizon for peridynamic interaction. | |
| double | d_horizonMeshRatio |
| Horizon to mesh ratio. | |
Structure to read and store material related data.
Definition at line 270 of file materialDeck.h.
Constructor.
Definition at line 330 of file materialDeck.h.
|
inline |
Constructor.
Definition at line 343 of file materialDeck.h.
References inp::MatData::d_G, inp::MatData::d_Gc, inp::MatData::d_K, and d_matData.
|
inline |
Copy constructor.
| md | Another MaterialDeck object |
Definition at line 364 of file materialDeck.h.
|
inlinestatic |
The fields of the block itself.
A horizon or a ratio that is not given keeps -1 and is left out of the block, which is how the material classes read it as absent.
Definition at line 388 of file materialDeck.h.
References d_bondPotentialParams, d_computeParamsFromElastic, d_density, d_horizon, d_horizonMeshRatio, d_isPlaneStrain, d_materialType, d_statePotentialParams, and inp::field().
Referenced by getExampleJson(), and readFromJson().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A material type 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 example JSON object for ModelDeck configuration.
Returns the block with the given fields set
The extent of a bond is given either as Horizon, a length, or as Horizon_Mesh_Ratio, a multiple of the mesh size; naming one of the two is what selects it. The elastic constants K, G and Gc are written as given, since a material that states none of them cannot be built, and E is derived from K when it is not named.
| given | Field names and values to set, checked against the table |
Definition at line 463 of file materialDeck.h.
References inp::applyGiven(), inp::checkGroups(), fields(), and groups().
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(), getInputJson(), anonymous_namespace{main.cpp}::makeDeck(), and anonymous_namespace{testDeckRoundTrip.cpp}::testMaterialDeck().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A material type 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.
|
inlinestatic |
Quantities this deck accepts in more than one form.
Definition at line 440 of file materialDeck.h.
Referenced by getExampleJson(), and readFromJson().
|
inlinestatic |
The fields of the Influence_Function sub-block.
Definition at line 424 of file materialDeck.h.
References d_influenceFnParams, d_influenceFnType, and inp::field().
Referenced by readFromJson().
|
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 560 of file materialDeck.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 515 of file materialDeck.h.
References d_bondPotentialParams, d_bondPotentialType, d_checkScFactor, d_computeParamsFromElastic, d_density, d_horizon, d_horizonMeshRatio, d_influenceFnParams, d_influenceFnType, d_irreversibleBondBreak, d_isPlaneStrain, d_matData, d_materialType, d_stateContributionFromBrokenBond, d_statePotentialParams, d_statePotentialType, util::io::getTabS(), and inp::MatData::printStr().
Referenced by material::PdState::computeParameters(), and print().
|
inline |
Reads from json object.
Definition at line 484 of file materialDeck.h.
References inp::checkGroups(), d_bondPotentialParams, d_computeParamsFromElastic, d_isPlaneStrain, d_matData, fields(), groups(), influenceFields(), inp::readFields(), and inp::MatData::readFromJson().
Referenced by anonymous_namespace{testDeckRoundTrip.cpp}::testMaterialDeck().
| std::vector<double> inp::MaterialDeck::d_bondPotentialParams |
List of parameters for pairwise potential.
Definition at line 291 of file materialDeck.h.
Referenced by fields(), material::PdElastic::PdElastic(), material::PdState::PdState(), material::PmbMaterial::PmbMaterial(), printStr(), readFromJson(), and material::RnpMaterial::RnpMaterial().
| size_t inp::MaterialDeck::d_bondPotentialType |
Type of pairwise (bond-based) potential.
Definition at line 282 of file materialDeck.h.
Referenced by printStr().
| double inp::MaterialDeck::d_checkScFactor |
Factor to check if bond is broken.
Definition at line 310 of file materialDeck.h.
Referenced by printStr().
| bool inp::MaterialDeck::d_computeParamsFromElastic |
Compute Peridynamic material properties from elastic properties.
Definition at line 313 of file materialDeck.h.
Referenced by fields(), material::PdElastic::PdElastic(), material::PdState::PdState(), material::PmbMaterial::PmbMaterial(), printStr(), readFromJson(), and material::RnpMaterial::RnpMaterial().
| double inp::MaterialDeck::d_density |
Density of material.
Definition at line 319 of file materialDeck.h.
Referenced by fields(), and printStr().
| double inp::MaterialDeck::d_horizon |
Horizon for peridynamic interaction.
Definition at line 322 of file materialDeck.h.
Referenced by particle::BaseParticle::BaseParticle(), fields(), and printStr().
| double inp::MaterialDeck::d_horizonMeshRatio |
Horizon to mesh ratio.
Definition at line 325 of file materialDeck.h.
Referenced by particle::BaseParticle::BaseParticle(), fields(), and printStr().
| std::vector<double> inp::MaterialDeck::d_influenceFnParams |
List of parameters for influence function.
Definition at line 297 of file materialDeck.h.
Referenced by material::PmbMaterial::computeParameters(), material::PdElastic::computeParameters(), influenceFields(), material::PdElastic::PdElastic(), material::PdState::PdState(), material::PmbMaterial::PmbMaterial(), printStr(), and material::RnpMaterial::RnpMaterial().
| size_t inp::MaterialDeck::d_influenceFnType |
Type of influence function.
Definition at line 288 of file materialDeck.h.
Referenced by material::PmbMaterial::computeParameters(), material::PdElastic::computeParameters(), material::PdState::computeParameters(), influenceFields(), material::PdElastic::PdElastic(), material::PdState::PdState(), material::PmbMaterial::PmbMaterial(), printStr(), and material::RnpMaterial::RnpMaterial().
| bool inp::MaterialDeck::d_irreversibleBondBreak |
Flag for irreversible breaking of bonds.
True means bond breaking is irreversible.
Definition at line 304 of file materialDeck.h.
Referenced by printStr().
| bool inp::MaterialDeck::d_isPlaneStrain |
Indicates if the 2-d simulation is of plane-strain type (thick material) or plane-stress type (thin material)
Definition at line 276 of file materialDeck.h.
Referenced by fields(), material::PdElastic::PdElastic(), material::PdState::PdState(), material::PmbMaterial::PmbMaterial(), printStr(), readFromJson(), and material::RnpMaterial::RnpMaterial().
| inp::MatData inp::MaterialDeck::d_matData |
List of elastic and fracture properties.
Definition at line 316 of file materialDeck.h.
Referenced by material::RnpMaterial::computeParameters(), material::PmbMaterial::computeParameters(), material::PdElastic::computeParameters(), material::PdState::computeParameters(), MaterialDeck(), printStr(), and readFromJson().
| std::string inp::MaterialDeck::d_materialType |
Material type.
Definition at line 279 of file materialDeck.h.
Referenced by particle::BaseParticle::BaseParticle(), fields(), and printStr().
| bool inp::MaterialDeck::d_stateContributionFromBrokenBond |
Flag for contribution to hydrostatic force from the broken bond.
Definition at line 307 of file materialDeck.h.
Referenced by printStr().
| std::vector<double> inp::MaterialDeck::d_statePotentialParams |
List of parameters for hydrostatic potential.
Definition at line 294 of file materialDeck.h.
Referenced by fields(), and printStr().
| size_t inp::MaterialDeck::d_statePotentialType |
Type of hydrostatic (state-based) potential.
Definition at line 285 of file materialDeck.h.
Referenced by printStr().