XC Open source finite element analysis program
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 
70 //
72 //
74 //
76 class NodalLoad : public Load
77  {
78  private:
79  int myNode;
80  mutable Node *myNodePtr;
81  Vector load;
82  bool konstant;
83  // AddingSensitivity:BEGIN /////////////////////////////////////
84  int parameterID;
85  static Vector gradientVector;
86  // AddingSensitivity:END ///////////////////////////////////////
87 
88  Node *get_node_ptr(void);
89  const Node *get_node_ptr(void) const;
90 
91  protected:
92  DbTagData &getDbTagData(void) const;
93  int sendData(CommParameters &cp);
94  int recvData(const CommParameters &cp);
95  public:
96  NodalLoad(int tag, int theClassTag= LOAD_TAG_NodalLoad);
97  NodalLoad(int tag, int node, int classTag);
98  NodalLoad(int tag, int node, const Vector &load, bool isLoadConstant = false);
99 
100  virtual void setDomain(Domain *newDomain);
101  inline const Node *getNode(void) const
102  { return get_node_ptr(); }
103  virtual int getNodeTag(void) const;
104  virtual void applyLoad(double loadFactor);
105 
106  const Vector &getForce(void) const;
107  const Vector &getMoment(void) const;
108 
109  virtual int sendSelf(CommParameters &);
110  virtual int recvSelf(const CommParameters &);
111 
112  virtual void Print(std::ostream &s, int flag =0);
113 
114  // AddingSensitivity:BEGIN //////////////////////////////////////////
115  int setParameter(const std::vector<std::string> &argv, Parameter &param);
116  int updateParameter(int parameterID, Information &info);
117  int activateParameter(int parameterID);
118  const Vector & getExternalForceSensitivity(int gradNumber);
119  // AddingSensitivity:END ///////////////////////////////////////////
120  };
121 } // end of XC namespace
122 
123 #endif
124 
Base class for loads over nodes or elements.
Definition: Load.h:78
virtual void setDomain(Domain *newDomain)
Asigna a pointer al domain.
Definition: NodalLoad.cpp:105
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
Mesh node.
Definition: Node.h:99
Information about an element.
Definition: Information.h:80
virtual void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: NodalLoad.cpp:317
const Vector & getMoment(void) const
Returns the componentes del vector fuerza.
Definition: NodalLoad.cpp:187
const Vector & getForce(void) const
Returns the componentes del vector fuerza.
Definition: NodalLoad.cpp:134
int recvData(const CommParameters &cp)
Receives object member through the communicator being passed as parameter.
Definition: NodalLoad.cpp:283
Definition: Parameter.h:65
int sendData(CommParameters &cp)
Sends object member through the communicator being passed as parameter.
Definition: NodalLoad.cpp:272
Communication parameters between processes.
Definition: CommParameters.h:65
Load over a node.
Definition: NodalLoad.h:76
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: NodalLoad.cpp:264
================================================================================
Definition: ContinuaReprComponent.h:34
NodalLoad(int tag, int theClassTag=LOAD_TAG_NodalLoad)
Constructor.
Definition: NodalLoad.cpp:77