XC Open source finite element analysis program
ImposedMotionBase.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 //ImposedMotionBase.h
28 
29 #ifndef ImposedMotionBase_h
30 #define ImposedMotionBase_h
31 
32 #include <domain/constraints/SFreedom_Constraint.h>
33 #include <utility/matrix/Vector.h>
34 
35 namespace XC {
36 class GroundMotion;
37 class Node;
38 class LoadPattern;
39 
41 //
44  {
45  private:
46  int groundMotionTag;
47  int patternTag;
48 
49  protected:
50  GroundMotion *theGroundMotion; // pointer to ground motion
52  Vector theGroundMotionResponse; // the ground motions response
53  public:
54  // constructors
55  ImposedMotionBase(int classTag);
56  ImposedMotionBase(int classTag,int spTag, int nodeTag, int ndof, int patternTag, int theGroundMotionTag);
57 
58  // destructor
59  ~ImposedMotionBase(void);
60 
61  void setDomain(Domain *theDomain);
62 
63  double getValue(void) const;
64  bool isHomogeneous(void) const;
65 
66  int getMotion(void);
67 
68  int sendData(CommParameters &cp);
69  int recvData(const CommParameters &cp);
70  int sendSelf(CommParameters &);
71  int recvSelf(const CommParameters &);
72  };
73 } // end of XC namespace
74 
75 #endif
Node * theNode
pointer to node being constrained
Definition: ImposedMotionBase.h:51
ImposedMotionBase(int classTag)
Constructor.
Definition: ImposedMotionBase.cc:37
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
Mesh node.
Definition: Node.h:99
Base class for prescribed displacements at the nodes.
Definition: ImposedMotionBase.h:43
int recvData(const CommParameters &cp)
Receives object through the channel being passed as parameter.
Definition: ImposedMotionBase.cc:122
void setDomain(Domain *theDomain)
Sets the domain of the constraint.
Definition: ImposedMotionBase.cc:56
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ImposedMotionBase.cc:142
double getValue(void) const
Returns the prescribed value.
Definition: ImposedMotionBase.cc:84
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ImposedMotionBase.cc:130
int getMotion(void)
Gets the constraint motion.
Definition: ImposedMotionBase.cc:91
Base class for ground motions.
Definition: GroundMotion.h:83
Single freedom constraint.
Definition: SFreedom_Constraint.h:79
int sendData(CommParameters &cp)
Sends object members through the channel being passed as parameter.
Definition: ImposedMotionBase.cc:114
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
~ImposedMotionBase(void)
Destructor.
Definition: ImposedMotionBase.cc:49
bool isHomogeneous(void) const
Returns true if the prescribed value is zero.
Definition: ImposedMotionBase.cc:80