XC Open source finite element analysis program
RayleighDampingFactors.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //RayleighDampingFactors.h
28 
29 #ifndef RayleighDampingFactors_h
30 #define RayleighDampingFactors_h
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 #include "utility/actor/actor/MovableObject.h"
34 
35 class TritrizPos3d;
36 
37 namespace XC {
38 
39 class Vector;
40 class Information;
41 
43 //
45 class RayleighDampingFactors: public EntCmd, public MovableObject
46  {
47  double alphaM;
48  double betaK;
49  double betaK0;
50  double betaKc;
51  protected:
52  int sendData(CommParameters &);
53  int recvData(const CommParameters &);
54 
55  public:
57  RayleighDampingFactors(const double &alphaM,const double &betaK,const double &betaK0,const double &betaKc);
58  explicit RayleighDampingFactors(const Vector &);
59 
60  inline const double &getAlphaM(void) const
61  { return alphaM; }
62  inline const double &getBetaK(void) const
63  { return betaK; }
64  inline const double &getBetaK0(void) const
65  { return betaK0; }
66  inline const double &getBetaKc(void) const
67  { return betaKc; }
68  inline bool Nulos(void) const
69  { return (alphaM == 0.0 && betaK == 0.0 && betaK0 == 0.0 && betaKc == 0.0); }
70  inline bool KNulos(void) const
71  { return (betaK == 0.0 && betaK0 == 0.0 && betaKc == 0.0); }
72  int updateParameter(int parameterID, Information &info);
73 
74  int sendSelf(CommParameters &);
75  int recvSelf(const CommParameters &);
76 
77  void Print(std::ostream &s, int flag= 0) const;
78 
79  };
80 
81 std::ostream &operator<<(std::ostream &os,const RayleighDampingFactors &rF);
82 
83 } // end of XC namespace
84 
85 #endif
86 
Definition: Vector.h:82
Information about an element.
Definition: Information.h:80
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:76
Object that can move between processes.
Definition: MovableObject.h:91
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:69
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:45
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:97
Communication parameters between processes.
Definition: CommParameters.h:65
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:83
================================================================================
Definition: ContinuaReprComponent.h:34
RayleighDampingFactors(void)
constructor
Definition: RayleighDampingFactors.cc:35