xc
NodalLoad.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.6 $
48 // $Date: 2003/03/04 00:48:11 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/domain/load/NodalLoad.h,v $
50 
51 
52 #ifndef NodalLoad_h
53 #define NodalLoad_h
54 
55 // Written: fmk
56 // Created: 11/96
57 // Revision: A
58 //
59 // Purpose: This file contains the class interface for NodalLoad.
60 // NodalLoad is a class for applying nodal loads to the model.
61 
62 #include "domain/load/Load.h"
63 #include "utility/matrix/Vector.h"
64 
65 namespace XC {
66 class Node;
67 class Vector;
68 
72 //
74 //
82 class NodalLoad : public Load
83  {
84  private:
85  int loadedNode;
86  mutable Node *loadedNodePtr;
87  Vector load;
88  bool konstant;
89  // AddingSensitivity:BEGIN /////////////////////////////////////
90  int parameterID;
91  static Vector gradientVector;
92  // AddingSensitivity:END ///////////////////////////////////////
93 
94  Node *get_node_ptr(void);
95  const Node *get_node_ptr(void) const;
96 
97  protected:
98  DbTagData &getDbTagData(void) const;
99  int sendData(CommParameters &cp);
100  int recvData(const CommParameters &cp);
101  public:
102  NodalLoad(int tag, int theClassTag= LOAD_TAG_NodalLoad);
103  NodalLoad(int tag, int node, int classTag);
104  NodalLoad(int tag, int node, const Vector &load, bool isLoadConstant = false);
105 
106  virtual void setDomain(Domain *newDomain);
107  inline const Node *getNode(void) const
108  { return get_node_ptr(); }
109  virtual int getNodeTag(void) const;
110  virtual void applyLoad(double loadFactor);
111 
112  const Vector &getForce(void) const;
113  const Vector &getMoment(void) const;
114 
115  virtual int sendSelf(CommParameters &);
116  virtual int recvSelf(const CommParameters &);
117 
118  virtual void Print(std::ostream &s, int flag =0);
119 
120  // AddingSensitivity:BEGIN //////////////////////////////////////////
121  int setParameter(const std::vector<std::string> &argv, Parameter &param);
122  int updateParameter(int parameterID, Information &info);
123  int activateParameter(int parameterID);
124  const Vector & getExternalForceSensitivity(int gradNumber);
125  // AddingSensitivity:END ///////////////////////////////////////////
126  };
127 } // end of XC namespace
128 
129 #endif
130 
Float vector abstraction.
Definition: Vector.h:93
const Vector & getMoment(void) const
Returns the components of the moment.
Definition: NodalLoad.cpp:219
int recvData(const CommParameters &cp)
Receives object member through the communicator being passed as parameter.
Definition: NodalLoad.cpp:325
Information about an element.
Definition: Information.h:80
const Vector & getForce(void) const
Returns the componentes of the force vector.
Definition: NodalLoad.cpp:162
virtual void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: NodalLoad.cpp:363
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
virtual int getNodeTag(void) const
Returns the identifier of the loaded node.
Definition: NodalLoad.cpp:158
virtual void setDomain(Domain *newDomain)
To set the associated Domain object.
Definition: NodalLoad.cpp:135
virtual void applyLoad(double loadFactor)
Applies the load on the node.
Definition: NodalLoad.cpp:292
virtual int recvSelf(const CommParameters &)
Receives.
Definition: NodalLoad.cpp:349
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: NodalLoad.cpp:370
virtual int sendSelf(CommParameters &)
Sends the object.
Definition: NodalLoad.cpp:335
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: NodalLoad.cpp:306
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: NodalLoad.cpp:413
int sendData(CommParameters &cp)
Sends object member through the communicator being passed as parameter.
Definition: NodalLoad.cpp:314
Communication parameters between processes.
Definition: CommParameters.h:65
Definition: Parameter.h:65
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: NodalLoad.cpp:390
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
Mesh node.
Definition: Node.h:110
NodalLoad(int tag, int theClassTag=LOAD_TAG_NodalLoad)
Constructor.
Definition: NodalLoad.cpp:80
Load over a node.
Definition: NodalLoad.h:82
Base class for loads over nodes or elements.
Definition: Load.h:82