NLMech  0.1.0
dampingGeom.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 GEOM_DAMPINGGEOM_H
10 #define GEOM_DAMPINGGEOM_H
11 
12 #include "util/point.h" // definition of Point3
13 #include <string>
14 #include <vector>
15 
16 // forward declaration of interior flags deck
17 namespace inp {
18 struct AbsorbingCondDeck;
19 }
20 
21 namespace fe {
22 class Mesh;
23 }
24 
25 namespace geometry {
26 
31 class DampingGeom {
32 public:
39  const fe::Mesh *mesh);
40 
41 
45  bool isDampingActive() const;
46 
50  bool isViscousDamping() const;
51 
57  double getCoefficient(const size_t &i);
58 
64  double getCoefficient(const size_t &i) const ;
65 
66 
71  const std::vector<double> *getCoefficientDataP() const ;
72 
77  const std::vector<double> *getCoefficientDataP();
78 
79 
89  std::string printStr(int nt = 0, int lvl = 0) const;
90 
98  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
99 
100 
101 protected:
107  void computeDampingCoefficient(const fe::Mesh *mesh);
108 
110  size_t d_dim;
111 
114 
116  std::vector<double> d_coefficients;
117 };
118 
119 } // namespace geometry
120 
121 #endif // GEOM_DAMPINGGEOM_H
A class for mesh data.
Definition: mesh.h:49
An abstraction class to process geometry for damping force calculation.
Definition: dampingGeom.h:31
bool isViscousDamping() const
Definition: dampingGeom.cpp:168
double getCoefficient(const size_t &i)
Get nodal volume of node i.
Definition: dampingGeom.cpp:150
const std::vector< double > * getCoefficientDataP() const
Get pointer to the coefficient data.
Definition: dampingGeom.cpp:160
bool isDampingActive() const
Definition: dampingGeom.cpp:164
size_t d_dim
Dimension.
Definition: dampingGeom.h:110
void computeDampingCoefficient(const fe::Mesh *mesh)
Compute damping coefficients at nodal coordinates.
Definition: dampingGeom.cpp:31
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: dampingGeom.h:98
inp::AbsorbingCondDeck * d_absorbingDeck_p
input deck for absorbing condition
Definition: dampingGeom.h:113
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: dampingGeom.cpp:172
DampingGeom(inp::AbsorbingCondDeck *deck, const fe::Mesh *mesh)
Constructor.
Definition: dampingGeom.cpp:22
std::vector< double > d_coefficients
Coefficients.
Definition: dampingGeom.h:116
Collection of methods and data related to finite element and mesh.
Definition: baseElem.h:15
Collection of methods and data related to geometry.
Definition: DataManager.h:23
Collection of methods and database related to input.
Definition: main.cpp:21
Structure to read and store mesh related input data.
Definition: absborbingCondDeck.h:82