xc
BrickSurfaceLoad.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 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 #ifndef BrickSurfaceLoad_h
49 #define BrickSurfaceLoad_h
50 
51 // Written: Chris McGann
52 // Created: 04.2009
53 // Modified: Chris McGann, 11.2010
54 // Chris McGann, 02.2011 -> added elemental load
55 
56 // Description: This file contains the class definition for BrickSurfaceLoad.
57 
58 #include "domain/mesh/element/plane/surface_pressures/SurfaceLoadBase.h"
59 #include "utility/geom/d2/Polygon3d.h"
60 
61 namespace XC {
62 class ShellLinearCrdTransf3d;
63 
64 // number of nodes per element
65 const int SL_NUM_NODE= 4;
66 // d.o.f. per node
67 const int SL_NUM_NDF= 3;
68 // degrees of freedom per element
69 const int SL_NUM_DOF(SL_NUM_NODE*SL_NUM_NDF);
70 // displacement degrees of freedom per element
71 const int SL_NUM_DDOF(SL_NUM_DOF);
72 
73 class BrickSurfaceLoad: public SurfaceLoadBase<SL_NUM_NODE>
74  {
75  private:
76  // method to update base vectors g1 & g2
77  int UpdateBase(double Xi, double Eta) const;
78 
79  mutable Vector internalForces;
80  //Vector theVector; //!< vector to return the residual
81 
82  mutable Vector g1;
83  mutable Vector g2;
84  mutable Vector myNhat;
85 
86  mutable Vector myNI;
87 
88  Vector dcrd1;
89  Vector dcrd2;
90  Vector dcrd3;
91  Vector dcrd4;
92 
93  const double oneOverRoot3= 1.0/sqrt(3.0);
94  static double GsPts[SL_NUM_NODE][2];
95 
96  static Matrix tangentStiffness;
97  protected:
98  DbTagData &getDbTagData(void) const;
99  int sendData(Communicator &);
100  int recvData(const Communicator &);
101  public:
102  BrickSurfaceLoad(int tag= 0);
103  BrickSurfaceLoad(int tag, int Nd1, int Nd2, int Nd3, int Nd4, double pressure);
104  ~BrickSurfaceLoad(void);
105  Element *getCopy(void) const;
106 
107  size_t getDimension(void) const;
109  const ShellLinearCrdTransf3d *getCoordTransf(void) const;
110  Polygon3d getPolygon(bool initialGeometry= true) const;
111  std::deque<Pos3d> getNodePositions(bool initialGeometry= true) const;
112  double getArea(bool initialGeometry) const;
113  int getVtkCellType(void) const;
114 
115  // public methods to obtain information about dof & connectivity
116  int getNumDOF(void) const;
117  void setDomain(Domain *theDomain);
118 
119  // public methods to obtain stiffness, mass, damping and
120  // residual information
121  const Matrix &getTangentStiff(void) const;
122  const Matrix &getInitialStiff(void) const;
123 
124  const Vector &getResistingForce(void) const;
125  const Vector &getResistingForceIncInertia(void) const;
126 
127  // public methods for element output
128  int sendSelf(Communicator &);
129  int recvSelf(const Communicator &);
130 
131  void Print(std::ostream &, int flag =0);
132 
133  };
134 
135 } //end of XC namespace
136 #endif
BrickSurfaceLoad(int tag=0)
Default constructor.
Definition: BrickSurfaceLoad.cpp:92
Float vector abstraction.
Definition: Vector.h:94
Plane polygon in a 3D space.
Definition: Polygon3d.h:35
Definition: SurfaceLoadBase.h:65
double getArea(bool initialGeometry) const
Returns element area.
Definition: BrickSurfaceLoad.cpp:209
Communication parameters between processes.
Definition: Communicator.h:66
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: BrickSurfaceLoad.cpp:311
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: BrickSurfaceLoad.cpp:216
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: BrickSurfaceLoad.cpp:295
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: BrickSurfaceLoad.cpp:223
Definition: BrickSurfaceLoad.h:73
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: BrickSurfaceLoad.cpp:112
Base class for the finite elements.
Definition: Element.h:112
Element * getCopy(void) const
Virtual constructor.
Definition: BrickSurfaceLoad.cpp:109
int getVtkCellType(void) const
VTK interface.
Definition: BrickSurfaceLoad.cpp:213
size_t getDimension(void) const
Return the element dimension (0, 1, 2 or 3).
Definition: BrickSurfaceLoad.cpp:156
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: BrickSurfaceLoad.cpp:247
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: BrickSurfaceLoad.cpp:259
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: BrickSurfaceLoad.cpp:277
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: BrickSurfaceLoad.cpp:252
Base class for small displacement 3D coordinate transformations.
Definition: ShellLinearCrdTransf3d.h:42
Polygon3d getPolygon(bool initialGeometry=true) const
Returns the element contour as a polygon.
Definition: BrickSurfaceLoad.cpp:199
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
std::deque< Pos3d > getNodePositions(bool initialGeometry=true) const
Returns the positions of the element nodes (without duplicates corresponding to degenerated elements)...
Definition: BrickSurfaceLoad.cpp:177
Matrix of floats.
Definition: Matrix.h:111
int getNumDOF(void) const
return number of dofs
Definition: BrickSurfaceLoad.cpp:125
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
ShellLinearCrdTransf3d * getCoordTransf(void)
Returns a pointer to the coordinate transformation.
Definition: BrickSurfaceLoad.cpp:160