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