PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
inp::ModelDeck Struct Reference

Structure to read and store model related input data. More...

#include <modelDeck.h>

Collaboration diagram for inp::ModelDeck:

Public Member Functions

 ModelDeck ()
 Constructor.
 
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.
 

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'.
 
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.
 
double d_horizon
 Horizon.
 
int d_rh
 Ratio of Horizon to mesh size.
 
double d_h
 Mesh size.
 
int d_seed
 Seed for random calculations (if any)
 

Detailed Description

Structure to read and store model related input data.

Definition at line 24 of file modelDeck.h.

Constructor & Destructor Documentation

◆ ModelDeck()

inp::ModelDeck::ModelDeck ( )
inline

Constructor.

Definition at line 104 of file modelDeck.h.

106 d_tFinal(0.), d_dt(0.), d_Nt(0),
107 d_horizon(0.), d_rh(0), d_h(0.), d_particleSimType(""), d_seed(1), d_quadOrder(1) {};
bool d_populateElementNodeConnectivity
Flag to indicate if we should populate element-node connectivity data in meshes.
Definition modelDeck.h:60
int d_rh
Ratio of Horizon to mesh size.
Definition modelDeck.h:93
size_t d_quadOrder
Order of quadrature approximation for strain and stress computation (default is 1)
Definition modelDeck.h:63
size_t d_Nt
Number of time steps.
Definition modelDeck.h:83
size_t d_dim
Dimension.
Definition modelDeck.h:74
double d_tFinal
Final simulation time.
Definition modelDeck.h:77
std::string d_particleSimType
Specify if this is single or multi particle simulation Expected value is either 'Single_Particle' or ...
Definition modelDeck.h:71
double d_h
Mesh size.
Definition modelDeck.h:96
int d_seed
Seed for random calculations (if any)
Definition modelDeck.h:99
double d_dt
Size of time steps.
Definition modelDeck.h:80
bool d_isRestartActive
Flag indicating if this restart problem.
Definition modelDeck.h:36
double d_horizon
Horizon.
Definition modelDeck.h:86

Member Function Documentation

◆ print()

void inp::ModelDeck::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Definition at line 149 of file modelDeck.h.

149{ std::cout << printStr(nt, lvl); }
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition modelDeck.h:116

References d_dim, and printStr().

Here is the call graph for this function:

◆ printStr()

std::string inp::ModelDeck::printStr ( int  nt = 0,
int  lvl = 0 
) const
inline

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Definition at line 116 of file modelDeck.h.

116 {
117
118 auto tabS = util::io::getTabS(nt);
119 std::ostringstream oss;
120 oss << tabS << "------- ModelDeck --------" << std::endl << std::endl;
121 oss << tabS << "Simulation type = " << d_simType << std::endl;
122 oss << tabS << "Restart active = " << d_isRestartActive << std::endl;
123 oss << tabS << "Populate element-node connectivity data = " << d_populateElementNodeConnectivity << std::endl;
124 oss << tabS << "Order of quad approximation = " << d_quadOrder << std::endl;
125 oss << tabS << "Spatial discretization type = " << d_spatialDiscretization
126 << std::endl;
127 oss << tabS << "Time discretization type = " << d_timeDiscretization
128 << std::endl;
129 oss << tabS << "Particle simulation type = " << d_particleSimType << std::endl;
130 oss << tabS << "Dimension = " << d_dim << std::endl;
131 oss << tabS << "Final time = " << d_tFinal << std::endl;
132 oss << tabS << "Time step size = " << d_dt << std::endl;
133 oss << tabS << "Number of time step = " << d_Nt << std::endl;
134 oss << tabS << "Horizon = " << d_horizon << std::endl;
135 oss << tabS << "Horizon to mesh size ratio = " << d_rh << std::endl;
136 oss << tabS << "Mesh size = " << d_h << std::endl;
137 oss << tabS << "Seed = " << d_seed << std::endl;
138 oss << tabS << std::endl;
139
140 return oss.str();
141 }
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
std::string d_simType
Simulation type.
Definition modelDeck.h:33
std::string d_spatialDiscretization
Tag for spatial discretization.
Definition modelDeck.h:47
std::string d_timeDiscretization
Tag for time discretization.
Definition modelDeck.h:57

References d_dim, d_dt, d_h, d_horizon, d_isRestartActive, d_Nt, d_particleSimType, d_populateElementNodeConnectivity, d_quadOrder, d_rh, d_seed, d_simType, d_spatialDiscretization, d_tFinal, d_timeDiscretization, and util::io::getTabS().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ d_dim

size_t inp::ModelDeck::d_dim

Dimension.

Definition at line 74 of file modelDeck.h.

Referenced by print(), and printStr().

◆ d_dt

double inp::ModelDeck::d_dt

Size of time steps.

Definition at line 80 of file modelDeck.h.

Referenced by printStr().

◆ d_h

double inp::ModelDeck::d_h

Mesh size.

Definition at line 96 of file modelDeck.h.

Referenced by printStr().

◆ d_horizon

double inp::ModelDeck::d_horizon

Horizon.

Definition at line 86 of file modelDeck.h.

Referenced by printStr().

◆ d_isRestartActive

bool inp::ModelDeck::d_isRestartActive

Flag indicating if this restart problem.

Definition at line 36 of file modelDeck.h.

Referenced by printStr().

◆ d_Nt

size_t inp::ModelDeck::d_Nt

Number of time steps.

Definition at line 83 of file modelDeck.h.

Referenced by printStr().

◆ d_particleSimType

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 71 of file modelDeck.h.

Referenced by printStr().

◆ d_populateElementNodeConnectivity

bool inp::ModelDeck::d_populateElementNodeConnectivity

Flag to indicate if we should populate element-node connectivity data in meshes.

Definition at line 60 of file modelDeck.h.

Referenced by printStr().

◆ d_quadOrder

size_t inp::ModelDeck::d_quadOrder

Order of quadrature approximation for strain and stress computation (default is 1)

Definition at line 63 of file modelDeck.h.

Referenced by printStr().

◆ d_rh

int inp::ModelDeck::d_rh

Ratio of Horizon to mesh size.

E.g. ratio = 4 means mesh size is 1/4th of the horizon.

Definition at line 93 of file modelDeck.h.

Referenced by printStr().

◆ d_seed

int inp::ModelDeck::d_seed

Seed for random calculations (if any)

Definition at line 99 of file modelDeck.h.

Referenced by printStr().

◆ d_simType

std::string inp::ModelDeck::d_simType

Simulation type.

List of allowed values are:

  • explicit
  • implicit

Definition at line 33 of file modelDeck.h.

Referenced by printStr().

◆ d_spatialDiscretization

std::string inp::ModelDeck::d_spatialDiscretization

Tag for spatial discretization.

List of allowed values are:

  • **finite_difference**
  • **weak_finite_element**
  • **nodal_finite_element**
  • **truss_finite_element**

Definition at line 47 of file modelDeck.h.

Referenced by printStr().

◆ d_tFinal

double inp::ModelDeck::d_tFinal

Final simulation time.

Definition at line 77 of file modelDeck.h.

Referenced by printStr().

◆ d_timeDiscretization

std::string inp::ModelDeck::d_timeDiscretization

Tag for time discretization.

List of allowed values are:

  • empty string
  • **central_difference**
  • **velocity_verlet**

Definition at line 57 of file modelDeck.h.

Referenced by printStr().


The documentation for this struct was generated from the following file: