PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
modelDeck.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef INP_MODELDECK_H
12#define INP_MODELDECK_H
13
14#include <string>
15
16namespace inp {
17
24struct ModelDeck {
25
33 std::string d_simType;
34
37
48
58
61
64
71 std::string d_particleSimType;
72
74 size_t d_dim;
75
77 double d_tFinal;
78
80 double d_dt;
81
83 size_t d_Nt;
84
86 double d_horizon;
87
93 int d_rh;
94
96 double d_h;
97
99 int d_seed;
100
108
116 std::string printStr(int nt = 0, int lvl = 0) const {
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 }
142
149 void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); }
150};
151
154} // namespace inp
155
156#endif // INP_MODELDECK_H
Collection of methods and database related to input.
Definition mesh.h:20
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
Structure to read and store model related input data.
Definition modelDeck.h:24
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
std::string d_simType
Simulation type.
Definition modelDeck.h:33
ModelDeck()
Constructor.
Definition modelDeck.h:104
int d_seed
Seed for random calculations (if any)
Definition modelDeck.h:99
std::string d_spatialDiscretization
Tag for spatial discretization.
Definition modelDeck.h:47
double d_dt
Size of time steps.
Definition modelDeck.h:80
bool d_isRestartActive
Flag indicating if this restart problem.
Definition modelDeck.h:36
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition modelDeck.h:116
void print(int nt=0, int lvl=0) const
Prints the information about the object.
Definition modelDeck.h:149
std::string d_timeDiscretization
Tag for time discretization.
Definition modelDeck.h:57
double d_horizon
Horizon.
Definition modelDeck.h:86