xc
InternalParamsA.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //InternalParamsA.h
29 
30 #ifndef INTERNALPARAMSA_H
31 #define INTERNALPARAMSA_H
32 
33 #include "utility/actor/actor/MovableObject.h"
34 
35 namespace XC {
37 //
40  {
41  protected:
42  double v;
43  double R;
44  double Tang;
45 
46  int sendData(Communicator &);
47  int recvData(const Communicator &);
48  public:
49  InternalParamsA(const double &V= 0.0,const double &r= 0.0,const double &t= 0.0);
50  inline const double &y(void) const //For PySimple1
51  { return v; }
52  inline double &y(void) //For PySimple1
53  { return v; }
54  inline double &z(void) //For QzSimple1
55  { return v; }
56  inline const double &z(void) const //For QzSimple1
57  { return v; }
58  inline const double &P(void) const //For PySimple1
59  { return R; }
60  inline double &P(void) //For PySimple1
61  { return R; }
62  inline const double &Q(void) const //For QzSimple1
63  { return R; }
64  inline double &Q(void) //For QzSimple1
65  { return R; }
66  inline const double &T(void) const //For TzSimple1
67  { return R; }
68  inline double &T(void) //For TzSimple1
69  { return R; }
70  inline const double &tang(void) const
71  { return Tang; }
72  inline double &tang(void)
73  { return Tang; }
74 
75  void getField(const double &V);
76  const double &updateField(const double &Tp);
77  inline const double unbalance(const double &Tp) const
78  { return (Tp - R); }
79  inline const double residual(const double &Tp) const
80  { return unbalance(Tp)/Tang; }
81 
82  void revertToStart(const double &tg);
83 
84  int sendSelf(Communicator &);
85  int recvSelf(const Communicator &);
86  };
87 } // end of XC namespace
88 
89 
90 #endif
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: InternalParamsA.cc:57
InternalParamsA(const double &V=0.0, const double &r=0.0, const double &t=0.0)
Constructor with data.
Definition: InternalParamsA.cc:33
double R
Force.
Definition: InternalParamsA.h:43
Communication parameters between processes.
Definition: Communicator.h:66
Object that can move between processes.
Definition: MovableObject.h:100
double v
Displacement.
Definition: InternalParamsA.h:42
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: InternalParamsA.cc:64
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: InternalParamsA.cc:85
double Tang
Combined tangent.
Definition: InternalParamsA.h:44
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: InternalParamsA.cc:71
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Internal parameters for the Gap (Drag + Closure).
Definition: InternalParamsA.h:39