xc
QuadSurfaceLoad.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 
29 #ifndef QuadSurfaceLoad_h
30 #define QuadSurfaceLoad_h
31 
32 // Written: Chris McGann
33 // Created: 04.2009
34 // Modified: Chris McGann, 11.2010
35 // Chris McGann, 02.2011 -> added elemental load
36 
37 // Description: This file contains the class definition for QuadSurfaceLoad.
38 
39 #include "domain/mesh/element/plane/surface_pressures/SurfaceLoadBase.h"
40 
41 namespace XC {
42 
43 // number of nodes per element
44 const int QSL_NUM_NODE= 2;
45 // d.o.f. per node
46 const int QSL_NUM_NDF= 2;
47 // degrees of freedom per element
48 const int QSL_NUM_DOF(QSL_NUM_NODE*QSL_NUM_NDF);
49 // displacement degrees of freedom per element
50 const int QSL_NUM_DDOF(QSL_NUM_DOF);
51 
52 class QuadSurfaceLoad: public SurfaceLoadBase<QSL_NUM_NODE>
53  {
54  private:
55  // method to update base vector g
56  int UpdateBase(double Xi) const;
57 
58  mutable Vector internalForces;
59  //Vector theVector; //!< vector to return the residual
60 
61  mutable Vector g;
62  mutable Vector myNhat;
63 
64  static Matrix tangentStiffness;
65  protected:
66  DbTagData &getDbTagData(void) const;
67  int sendData(Communicator &);
68  int recvData(const Communicator &);
69  public:
70  QuadSurfaceLoad(int tag= 0);
71  QuadSurfaceLoad(int tag, int Nd1, int Nd2, double pressure);
72  ~QuadSurfaceLoad(void);
73  Element *getCopy(void) const;
74 
75  // public methods to obtain information about dof & connectivity
76  int getNumDOF(void) const;
77  void setDomain(Domain *theDomain);
78 
79  size_t getDimension(void) const;
80  double getLength(bool initialGeometry= true) const;
81  int getVtkCellType(void) const;
82  Matrix getLocalAxes(bool) const;
83 
84  // public methods to obtain stiffness, mass, damping and
85  // residual information
86  const Matrix &getTangentStiff(void) const;
87  const Matrix &getInitialStiff(void) const;
88 
89  const Vector &getResistingForce(void) const;
90  const Vector &getResistingForceIncInertia(void) const;
91 
92  // public methods for element output
93  int sendSelf(Communicator &);
94  int recvSelf(const Communicator &);
95 
96  void Print(std::ostream &, int flag =0);
97  };
98 
99 } //end of XC namespace
100 #endif
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: QuadSurfaceLoad.cc:184
Float vector abstraction.
Definition: Vector.h:94
Definition: SurfaceLoadBase.h:65
Communication parameters between processes.
Definition: Communicator.h:66
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: QuadSurfaceLoad.cc:211
double getLength(bool initialGeometry=true) const
Return the length of the segment defined by the element.
Definition: QuadSurfaceLoad.cc:102
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
size_t getDimension(void) const
Return the element dimension (0, 1, 2 or 3).
Definition: QuadSurfaceLoad.cc:98
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: QuadSurfaceLoad.cc:165
QuadSurfaceLoad(int tag=0)
Default constructor.
Definition: QuadSurfaceLoad.cc:57
Base class for the finite elements.
Definition: Element.h:112
Matrix getLocalAxes(bool) const
Returns a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: QuadSurfaceLoad.cc:112
int getVtkCellType(void) const
VTK interface.
Definition: QuadSurfaceLoad.cc:130
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: QuadSurfaceLoad.cc:133
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: QuadSurfaceLoad.cc:196
Definition: QuadSurfaceLoad.h:52
int getNumDOF(void) const
return number of dofs
Definition: QuadSurfaceLoad.cc:83
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: QuadSurfaceLoad.cc:71
Element * getCopy(void) const
Virtual constructor.
Definition: QuadSurfaceLoad.cc:68
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: QuadSurfaceLoad.cc:160
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: QuadSurfaceLoad.cc:140
Matrix of floats.
Definition: Matrix.h:111
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: QuadSurfaceLoad.cc:172