NLMech  0.1.0
absborbingCondDeck.h
1 // Copyright (c) 2019 Prashant K. Jha
3 // Copyright (c) 2019 Patrick Diehl
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 
9 #ifndef INP_ABSORBING_COND_DECK_H
10 #define INP_ABSORBING_COND_DECK_H
11 
12 #include <string>
13 #include "util/utilIO.h"
14 
15 namespace inp {
16 
17 
20 
22  std::string d_relativeLoc;
23 
25  bool d_checkX;
27  bool d_checkY;
29  bool d_checkZ;
30 
37 
42 
43  DampingGeomData() : d_checkX(false), d_checkY(false), d_checkZ(false),
45  d_p1(util::Point3()), d_p2(util::Point3()) {};
46 
56  std::string printStr(int nt = 0, int lvl = 0) const {
57  auto tabS = util::io::getTabS(nt);
58  std::ostringstream oss;
59  oss << tabS << "------- DampingGeomData --------" << std::endl << std::endl;
60  oss << tabS << "Relative loc = " << d_relativeLoc << std::endl;
61  oss << tabS << std::endl;
62 
63  return oss.str();
64  };
65 
73  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
74 };
75 
83 
89 
92 
97  std::string d_dampingCoeffType;
98 
100  std::vector<double> d_dampingCoeffParams;
101 
103  std::vector<DampingGeomData> d_dampingGeoms;
104 
109 
119  std::string printStr(int nt = 0, int lvl = 0) const {
120  auto tabS = util::io::getTabS(nt);
121  std::ostringstream oss;
122  oss << tabS << "------- AbsorbingCondDeck --------" << std::endl << std::endl;
123  oss << tabS << "Is damping active = " << d_dampingActive << std::endl;
124  oss << tabS << "Is viscous damping = " << d_isViscousDamping << std::endl;
125  oss << tabS << std::endl;
126 
127  return oss.str();
128  };
129 
137  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
138 };
139 
142 } // namespace inp
143 
144 #endif // INP_ABSORBING_COND_DECK_H
Collection of methods and database related to input.
Definition: main.cpp:21
std::string getTabS(int nt)
Generate a string contaning nt tabs.
Definition: utilIO.h:26
Collection of methods useful in simulation.
Definition: DataManager.h:50
Structure to read and store mesh related input data.
Definition: absborbingCondDeck.h:82
std::vector< DampingGeomData > d_dampingGeoms
Damping region.
Definition: absborbingCondDeck.h:103
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: absborbingCondDeck.h:137
std::vector< double > d_dampingCoeffParams
Damping coefficient parameters.
Definition: absborbingCondDeck.h:100
std::string d_dampingCoeffType
Damping coefficient type.
Definition: absborbingCondDeck.h:97
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: absborbingCondDeck.h:119
bool d_dampingActive
Damping active.
Definition: absborbingCondDeck.h:91
AbsorbingCondDeck()
Constructor.
Definition: absborbingCondDeck.h:108
bool d_isViscousDamping
Damping type E.g. "viscous" and "non_viscous".
Definition: absborbingCondDeck.h:88
Definition: absborbingCondDeck.h:19
std::string d_relativeLoc
Relative location type.
Definition: absborbingCondDeck.h:22
double d_layerThicknessY
Definition: absborbingCondDeck.h:34
double d_layerThicknessX
Definition: absborbingCondDeck.h:32
bool d_checkY
Boolean for checking the y-direction.
Definition: absborbingCondDeck.h:27
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: absborbingCondDeck.h:73
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: absborbingCondDeck.h:56
bool d_checkX
Boolean for checking the x-direction.
Definition: absborbingCondDeck.h:25
util::Point3 d_p1
Definition: absborbingCondDeck.h:39
double d_layerThicknessZ
Definition: absborbingCondDeck.h:36
bool d_checkZ
Boolean for checking the z-direction.
Definition: absborbingCondDeck.h:29
util::Point3 d_p2
Definition: absborbingCondDeck.h:41
A structure to represent 3d vectors.
Definition: point.h:29