XC Open source finite element analysis program
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 &s, const DummyNode &N);
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 } // end of XC namespace
138 
139 #endif
140 
const Vector & getTrialDisp(void) const
Returns the trial value of the displacement of the node.
Definition: DummyNode.cpp:115
A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domai...
Definition: DOF_Group.h:94
int commitState()
Commits the state of the node.
Definition: DummyNode.cpp:155
Definition: Vector.h:82
const Vector & getVel(void) const
Returns the velocity of the node.
Definition: DummyNode.cpp:107
const Vector & getDisp(void) const
Returns the displacement of the node.
Definition: DummyNode.cpp:103
const Vector & getCrds(void) const
return the vector of nodal coordinates
Definition: DummyNode.cpp:99
const Vector & getTrialAccel(void) const
Returns the trial value of the acceleration of the node.
Definition: DummyNode.cpp:125
const Vector & getTrialVel(void) const
Returns the trial value of the velocity of the node.
Definition: DummyNode.cpp:120
DOF_Group * getDOF_GroupPtr(void)
Gets the DOF_Group pointer.
Definition: DummyNode.cpp:77
Mesh node.
Definition: Node.h:99
int sendSelf(CommParameters &)
Envia el objeto through the channel being passed as parameter.
Definition: DummyNode.cpp:190
Base calass for the finite elements.
Definition: Element.h:104
int setMass(const Matrix &)
Asigna la matriz de masas to the node.
Definition: DummyNode.cpp:94
const Vector & getAccel(void) const
Returns the acceleration of the node.
Definition: DummyNode.cpp:111
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: DummyNode.cpp:198
Definition: Matrix.h:82
int getNumberDOF(void) const
Return the number of node DOFs.
Definition: DummyNode.cpp:81
DummyNodes are a type of node created and used by Subdomains for their exterior nodes. They reference a real node and most methods invoked on them are in turn invoked by the dummy node on the real node. The calls asking the real node to change its current state are ignored. The calls involving DOF_Group are handled by the dummy node.
Definition: DummyNode.h:85
void setDOF_GroupPtr(DOF_Group *theDOF_Grp)
Sets the DOF_Group pointer.
Definition: DummyNode.cpp:74
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
const Matrix & getMass(void)
Return the matriz de masas del nodo.
Definition: DummyNode.cpp:88