11#ifndef INP_CONTACTDECK_H
12#define INP_CONTACTDECK_H
82 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
85 std::ostringstream oss;
86 oss << tabS <<
"------- ContactPairDeck --------" << std::endl << std::endl;
87 oss << tabS <<
"Contact radius = " <<
d_contactR << std::endl;
89 <<
", Kn = " <<
d_Kn << std::endl;
90 oss << tabS <<
"epsilon = " <<
d_eps <<
", Beta_n = " <<
d_betan << std::endl;
91 oss << tabS <<
"Friction coefficient = " <<
d_mu << std::endl;
92 oss << tabS <<
"Damping status = " <<
d_dampingOn << std::endl;
95 oss << tabS <<
"Bulk modulus = " <<
d_kappa << std::endl;
96 oss << tabS << std::endl;
106 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); }
115 double getKn(
const double &v1,
const double &v2)
const {
117 return d_Kn * (v1 * v2) / (v1 + v2);
121 double getKn(
const double &v1,
const double &v2) {
123 return d_Kn * (v1 * v2) / (v1 + v2);
150 double getBetan(
const double &v1,
const double &v2)
const {
152 return d_betan * std::sqrt((v1 * v2) / (v1 + v2));
156 double getBetan(
const double &v1,
const double &v2) {
158 return d_betan * std::sqrt((v1 * v2) / (v1 + v2));
186 std::vector<std::vector<ContactPairDeck>>
d_data;
213 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
216 std::ostringstream oss;
217 oss << tabS <<
"------- ContactDeck --------" << std::endl << std::endl;
218 for (
size_t i =0; i<
d_data.size(); i++) {
219 for (
size_t j = 0; j <
d_data.size(); j++) {
220 oss << tabS <<
"ContactPairDeck id = (" << i <<
"," << j <<
") info:"
226 oss << tabS << std::endl;
237 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); }
Collection of methods and database related to input.
std::string getTabS(int nt)
Returns tab spaces of given size.