xc
ImposedMotionBase.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 //ImposedMotionBase.h
29 
30 #ifndef ImposedMotionBase_h
31 #define ImposedMotionBase_h
32 
33 #include <domain/constraints/SFreedom_Constraint.h>
34 #include <utility/matrix/Vector.h>
35 
36 namespace XC {
37 class GroundMotion;
38 class Node;
39 class LoadPattern;
40 
42 //
45  {
46  private:
47  int groundMotionTag;
48  int patternTag;
49 
50  protected:
51  GroundMotion *theGroundMotion; // pointer to ground motion
53  Vector theGroundMotionResponse; // the ground motions response
54  int sendData(Communicator &comm);
55  int recvData(const Communicator &comm);
56  public:
57  // constructors
58  ImposedMotionBase(int classTag);
59  ImposedMotionBase(int classTag,int spTag, int nodeTag, int ndof, int patternTag, int theGroundMotionTag);
60 
61  // destructor
62  ~ImposedMotionBase(void);
63 
64  void setDomain(Domain *theDomain);
65 
66  double getValue(void) const;
67  bool isHomogeneous(void) const;
68 
69  int getMotion(void);
70 
71  int sendSelf(Communicator &);
72  int recvSelf(const Communicator &);
73  boost::python::dict getPyDict(void) const;
74  void setPyDict(const boost::python::dict &);
75  };
76 } // end of XC namespace
77 
78 #endif
bool isHomogeneous(void) const
Returns true if the prescribed value is zero.
Definition: ImposedMotionBase.cc:80
Float vector abstraction.
Definition: Vector.h:94
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: ImposedMotionBase.cc:138
Communication parameters between processes.
Definition: Communicator.h:66
void setDomain(Domain *theDomain)
Sets the domain of the constraint.
Definition: ImposedMotionBase.cc:56
Node * theNode
pointer to node being constrained
Definition: ImposedMotionBase.h:52
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ImposedMotionBase.cc:159
~ImposedMotionBase(void)
Destructor.
Definition: ImposedMotionBase.cc:49
int sendData(Communicator &comm)
Sends object members through the communicator argument.
Definition: ImposedMotionBase.cc:114
Single freedom constraint.
Definition: SFreedom_Constraint.h:85
Base class for ground motions.
Definition: GroundMotion.h:84
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ImposedMotionBase.cc:147
int getMotion(void)
Gets the constraint motion.
Definition: ImposedMotionBase.cc:91
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: ImposedMotionBase.cc:130
double getValue(void) const
Returns the prescribed value.
Definition: ImposedMotionBase.cc:84
ImposedMotionBase(int classTag)
Constructor.
Definition: ImposedMotionBase.cc:37
Base class for prescribed displacements at the nodes.
Definition: ImposedMotionBase.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
Mesh node.
Definition: Node.h:111
int recvData(const Communicator &comm)
Receives object through the communicator argument.
Definition: ImposedMotionBase.cc:122