xc
DummyNode.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 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.2 $
49 // $Date: 2003/02/14 23:00:58 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/domain/mesh/node/DummyNode.h,v $
51 
52 
53 // File: ~/domain/mesh/node/DummyNode.h
54 //
55 // Written: fmk
56 // Created: Fri Sep 20 15:34:47: 1996
57 // Revision: A
58 //
59 // Purpose: This file contains the class definition for DummyNode.
60 // DummyNodes are a type of node created and used by Subdomains for their
61 // exterior nodes. They reference a real node and most methods invoked on
62 // them are in turn invoked by the dummy node on the real node. The calls
63 // asking the real node to change its current state are ignored. The
64 // calls involving DOF\_Group are handled by the dummy node.
65 //
66 //
67 // What: "@(#) DummyNode.h, revA"
68 
69 #ifndef DummyNode_h
70 #define DummyNode_h
71 
72 #include "domain/mesh/node/Node.h"
73 
74 namespace XC {
75 class DOF_Group;
76 class Element;
77 
79 //
86 class DummyNode: public Node
87  {
88  private:
89  Node *theRealNode;
90  DOF_Group *theDOFGroup;
91  public:
92  DummyNode(void);
93  DummyNode(Node &theRealNode);
94 
95  Node *getNode(void) const;
96 
97  void setDOF_GroupPtr(DOF_Group *theDOF_Grp);
99  int getNumberDOF(void) const;
100 
101  const Matrix &getMass(void) const;
102  int setMass(const Matrix &);
103 
104  const Vector &getCrds(void) const;
105 
106  const Vector &getDisp(void) const;
107  const Vector &getVel(void) const;
108  const Vector &getAccel(void) const;
109 
110  const Vector &getTrialDisp(void) const;
111  const Vector &getTrialVel(void) const;
112  const Vector &getTrialAccel(void) const;
113 
114  int setTrialDisp(const Vector &);
115  int setTrialVel(const Vector &);
116  int setTrialAccel(const Vector &);
117 
118  int setIncrTrialDisp(const Vector &);
119  int setIncrTrialVel(const Vector &);
120  int setIncrTrialAccel(const Vector &);
121 
122  void addUnbalancedLoad(const Vector &);
123  const Vector &getUnbalancedLoad(void) const;
124  void zeroUnbalancedLoad(void);
125  int commitState();
126 
127  void Print(std::ostream &s) const;
128  friend std::ostream &operator<<(std::ostream &, const DummyNode &);
129 
130  int addElementPtr(Element *);
131 
132  void setColor(int newColor);
133  int getColor(void) const;
134 
135  int sendSelf(Communicator &);
136  int recvSelf(const Communicator &);
137  };
138 
139 std::ostream &operator<<(std::ostream &, const DummyNode &);
140 } // end of XC namespace
141 
142 #endif
143 
const Vector & getVel(void) const
Returns the result of invoking getVel() on its associated node object.
Definition: DummyNode.cpp:120
Float vector abstraction.
Definition: Vector.h:94
int addElementPtr(Element *)
Does nothing.
Definition: DummyNode.cpp:192
const Vector & getTrialDisp(void) const
Returns the result of invoking getTrialDisp() on its associated node object.
Definition: DummyNode.cpp:132
Communication parameters between processes.
Definition: Communicator.h:66
void Print(std::ostream &s) const
Print stuff.
Definition: DummyNode.cpp:229
void addUnbalancedLoad(const Vector &)
Returns the result of invoking addUnbalancedLoad() on its associated node object. ...
Definition: DummyNode.cpp:179
int setTrialAccel(const Vector &)
Does nothing.
Definition: DummyNode.cpp:155
int setIncrTrialVel(const Vector &)
Does nothing.
Definition: DummyNode.cpp:165
const Vector & getTrialVel(void) const
Returns the result of invoking getTrialVel() on its associated Node object.
Definition: DummyNode.cpp:137
const Vector & getTrialAccel(void) const
Returns the result of invoking getTrialAccel() on its associated node object.
Definition: DummyNode.cpp:142
int setIncrTrialDisp(const Vector &)
Does nothing.
Definition: DummyNode.cpp:160
void setDOF_GroupPtr(DOF_Group *theDOF_Grp)
Each DummyNode, when involved with a StaticCondensationAnalysis analysis, will be associated with a D...
Definition: DummyNode.cpp:78
const Vector & getUnbalancedLoad(void) const
Returns the result of invoking getUnbalancedLoad() on its associated node object. ...
Definition: DummyNode.cpp:184
DOF_Group * getDOF_GroupPtr(void)
Method which returns a pointer to the DOF_Group object that was set using {setDOF_GroupPtr}.
Definition: DummyNode.cpp:84
Base class for the finite elements.
Definition: Element.h:112
void zeroUnbalancedLoad(void)
Calls zeroUnbalancedLoad() on its associated node.
Definition: DummyNode.cpp:188
const Vector & getCrds(void) const
Returns the result of invoking getCrds() on its associated node object.
Definition: DummyNode.cpp:108
const Matrix & getMass(void) const
Returns the result of invoking getMass() on its associated node object.
Definition: DummyNode.cpp:96
Node * getNode(void) const
Return a pointer to the associated node.
Definition: DummyNode.cpp:71
const Vector & getAccel(void) const
Returns the result of invoking getAccel() on its associated Node object.
Definition: DummyNode.cpp:126
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: DummyNode.cpp:221
A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domai...
Definition: DOF_Group.h:107
void setColor(int newColor)
Does nothing.
Definition: DummyNode.cpp:200
const Vector & getDisp(void) const
Returns the result of invoking getDisp() on its associated Node object.
Definition: DummyNode.cpp:114
int sendSelf(Communicator &)
Send the object through the communicator argument.
Definition: DummyNode.cpp:212
int getColor(void) const
Does nothing.
Definition: DummyNode.cpp:206
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
DummyNodes are a type of node created and used by Subdomains for their exterior nodes.
Definition: DummyNode.h:86
Matrix of floats.
Definition: Matrix.h:111
int commitState()
Does nothing.
Definition: DummyNode.cpp:173
int setIncrTrialAccel(const Vector &)
Does nothing.
Definition: DummyNode.cpp:169
int getNumberDOF(void) const
Invokes getNumberDOF() on its associated node object.
Definition: DummyNode.cpp:90
int setTrialDisp(const Vector &)
Does nothing.
Definition: DummyNode.cpp:146
int setTrialVel(const Vector &)
Does nothing.
Definition: DummyNode.cpp:150
Mesh node.
Definition: Node.h:111
int setMass(const Matrix &)
Returns the result of invoking setMass() on its associated node object.
Definition: DummyNode.cpp:101