xc
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/kernel/CommandEntity.h"
33 #include "utility/actor/actor/MovableObject.h"
34 
35 class Pos3dArray3d;
36 
37 namespace XC {
38 
39 class Vector;
40 class Information;
41 
43 //
58 class RayleighDampingFactors: public CommandEntity, public MovableObject
59  {
60  double alphaM;
61  double betaK;
62  double betaK0;
63  double betaKc;
64  protected:
65  int sendData(CommParameters &);
66  int recvData(const CommParameters &);
67 
68  public:
70  RayleighDampingFactors(const double &alphaM,const double &betaK,const double &betaK0,const double &betaKc);
71  explicit RayleighDampingFactors(const Vector &);
72 
75  inline const double &getAlphaM(void) const
76  { return alphaM; }
79  inline void setAlphaM(const double &d)
80  { alphaM= d; }
83  inline const double &getBetaK(void) const
84  { return betaK; }
87  inline void setBetaK(const double &d)
88  { betaK= d; }
91  inline const double &getBetaK0(void) const
92  { return betaK0; }
95  inline void setBetaK0(const double &d)
96  { betaK0= d; }
99  inline const double &getBetaKc(void) const
100  { return betaKc; }
103  inline void setBetaKc(const double &d)
104  { betaKc= d; }
106  inline bool nullValues(void) const
107  { return (alphaM == 0.0 && nullKValues()); }
109  inline bool nullKValues(void) const
110  { return (betaK == 0.0 && betaK0 == 0.0 && betaKc == 0.0); }
111  int updateParameter(int parameterID, Information &info);
112 
113  int sendSelf(CommParameters &);
114  int recvSelf(const CommParameters &);
115 
116  void Print(std::ostream &s, int flag= 0) const;
117 
118  };
119 
120 std::ostream &operator<<(std::ostream &,const RayleighDampingFactors &);
121 
122 } // end of XC namespace
123 
124 #endif
125 
Float vector abstraction.
Definition: Vector.h:93
void Print(std::ostream &s, int flag=0) const
Print Rayleigh factors values.
Definition: RayleighDampingFactors.cc:52
RayleighDampingFactors(void)
Constructor.
Definition: RayleighDampingFactors.cc:35
Information about an element.
Definition: Information.h:80
void setAlphaM(const double &d)
set the damping factor applied to elements or nodes mass matrix
Definition: RayleighDampingFactors.h:79
Object that can move between processes.
Definition: MovableObject.h:99
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:76
const double & getBetaKc(void) const
return the damping factor applied to elements committed stiffness matrix
Definition: RayleighDampingFactors.h:99
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:90
void setBetaKc(const double &d)
set the damping factor applied to elements committed stiffness matrix
Definition: RayleighDampingFactors.h:103
void setBetaK(const double &d)
set the damping factor applied to elements current stiffness matrix
Definition: RayleighDampingFactors.h:87
bool nullKValues(void) const
Returns true if all Rayleigh stiffness factors are zero.
Definition: RayleighDampingFactors.h:109
const double & getAlphaM(void) const
return the damping factor applied to elements or nodes mass matrix
Definition: RayleighDampingFactors.h:75
const double & getBetaK0(void) const
return the damping factor applied to elements initial stiffness matrix
Definition: RayleighDampingFactors.h:91
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:83
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:58
const double & getBetaK(void) const
return the damping factor applied to elements current stiffness matrix
Definition: RayleighDampingFactors.h:83
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
bool nullValues(void) const
Returns true if all Rayleigh factors are zero.
Definition: RayleighDampingFactors.h:106
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: RayleighDampingFactors.cc:105
Communication parameters between processes.
Definition: CommParameters.h:65
int updateParameter(int parameterID, Information &info)
Update the value of a parameter.
Definition: RayleighDampingFactors.cc:60
void setBetaK0(const double &d)
set the damping factor applied to elements initial stiffness matrix
Definition: RayleighDampingFactors.h:95