xc
SurfaceLoad.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 ** 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 // Written: Chris McGann, U.Washington
48 // 02.2011
49 //
50 // Description: This file contains the class definition for SurfaceLoad.
51 
52 #ifndef SurfaceLoad_h
53 #define SurfaceLoad_h
54 
55 #include "ElementBodyLoad.h"
56 #include "utility/matrix/Vector.h"
57 
58 namespace XC {
59 
61 //
64  {
65  private:
66  int dim;
67  double pressure;
68  protected:
69  DbTagData &getDbTagData(void) const;
70  int sendData(Communicator &comm);
71  int recvData(const Communicator &comm);
72  public:
73  SurfaceLoad(int tag= 0, const int &dim= 2, const double &pressure= 0.0);
74  SurfaceLoad(int tag,const ID &tags_elems, const int &dim= 2, const double &pressure= 0.0);
75 
76  const Vector &getData(int &type, const double &loadFactor) const;
77 
78  std::string Category(void) const;
79 
80  int getDim(void) const;
81  void setDim(const int &);
82  double getPressure(void) const;
83  void setPressure(const double &);
84  virtual Vector getLocalForce(void) const;
85  Vector3d getVector3dLocalForce(void) const;
86 
87  virtual void applyLoad(double loadfactor);
88 
89  int sendSelf(Communicator &);
90  int recvSelf(const Communicator &);
91  void Print(std::ostream &, int flag = 0);
92  };
93 } // end of XC namespace
94 
95 #endif
Float vector abstraction.
Definition: Vector.h:94
int getDim(void) const
Get the dimension of the space (2 or 3).
Definition: SurfaceLoad.cpp:54
Base class for body loads over elements.
Definition: ElementBodyLoad.h:44
Communication parameters between processes.
Definition: Communicator.h:66
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: SurfaceLoad.cpp:122
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
Vector of integers.
Definition: ID.h:95
Vector3d getVector3dLocalForce(void) const
Return the local components of the force in a Vector3d.
Definition: SurfaceLoad.cpp:81
int sendSelf(Communicator &)
Send the object.
Definition: SurfaceLoad.cpp:146
int recvData(const Communicator &comm)
Receive data through the communicator argument.
Definition: SurfaceLoad.cpp:138
int recvSelf(const Communicator &)
Receive the object.
Definition: SurfaceLoad.cpp:159
virtual Vector getLocalForce(void) const
Returns force expressed in local coordinates.
Definition: SurfaceLoad.cpp:70
int sendData(Communicator &comm)
Send data through the communicator argument.
Definition: SurfaceLoad.cpp:129
void setPressure(const double &)
Get the pressure.
Definition: SurfaceLoad.cpp:66
virtual void applyLoad(double loadfactor)
Applies the load to the elements.
Definition: SurfaceLoad.cpp:93
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void setDim(const int &)
Set the dimension of the space (2 or 3).
Definition: SurfaceLoad.cpp:58
std::string Category(void) const
Return the category of the load.
Definition: SurfaceLoad.cpp:49
double getPressure(void) const
Set the pressure.
Definition: SurfaceLoad.cpp:62
Vector en tres dimensiones.
Definition: Vector3d.h:39
Load due to a pressure on the element surface.
Definition: SurfaceLoad.h:63
SurfaceLoad(int tag=0, const int &dim=2, const double &pressure=0.0)
Default constructor.
Definition: SurfaceLoad.cpp:32