xc
ConstantPressureVolumeQuad.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 // $Revision: 1.10 $
49 // $Date: 2003/02/14 23:01:10 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/ConstantPressureVolumeQuad.h,v $
51 
52 // Ed "C++" Love
53 //
54 // Constant Presssure/Volume Four Node Quadrilateral
55 // Plane Strain (NOT PLANE STRESS)
56 
57 #include "domain/mesh/element/plane/QuadBase4N.h"
58 #include "domain/mesh/element/utils/physical_properties/NDMaterialPhysicalProperties.h"
59 
60 namespace XC{
62 //
65 class ConstantPressureVolumeQuad: public QuadBase4N<NDMaterialPhysicalProperties>
66  {
67  private:
68  double xl[2][4];
69 
70  //static data
71  static double matrixData[64]; // array data for matrix
72  static Matrix stiff ;
73  static Vector resid ;
74  static Matrix mass ;
75  static Matrix damping ;
76 
77  //volume-pressure constants
78  static double one3 ;
79  static double two3 ;
80  static double four3 ;
81  static double one9 ;
82 
83  //quadrature data
84  static double sg[4] ;
85  static double tg[4] ;
86  static double wg[4] ;
87 
88 
89  //form residual and tangent
90  void formResidAndTangent(int tang_flag) const;
91  //inertia terms
92  void formInertiaTerms(int tangFlag) const;
93 
94  //shape function routine for four node quads
95  static void shape2d( double ss, double tt,
96  const double x[2][4],
97  double shp[3][4],
98  double &xsj,
99  Matrix &sx ) ;
100 
101  protected:
102  int sendData(Communicator &);
103  int recvData(const Communicator &);
104  public :
106  ConstantPressureVolumeQuad(int tag, int node1,int node2,int node3,int node4, NDMaterial &theMaterial);
107  Element *getCopy(void) const;
108 
109  int getNumDOF(void) const;
110  void setDomain(Domain *theDomain ) ;
111 
112  // public methods to set the state of the element
113  int update(void);
114 
115  // public methods to obtain stiffness, mass, damping and residual information
116  const Matrix &getTangentStiff(void) const;
117  const Matrix &getInitialStiff(void) const;
118  const Matrix &getMass(void) const;
119 
120  // public methods for updating ele load information
121  void alive(void);
122  int addLoad(ElementalLoad *theLoad, double loadFactor);
123  int addInertiaLoadToUnbalance(const Vector &accel);
124 
125  const Vector &getResistingForce(void) const;
126  const Vector &getResistingForceIncInertia(void) const;
127 
128  virtual int sendSelf(Communicator &);
129  virtual int recvSelf(const Communicator &);
130 
131  void Print( std::ostream &s, int flag ) const;
132  };
133 } // end of XC namespace
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
void alive(void)
Reactivates the element.
Definition: ConstantPressureVolumeQuad.cpp:552
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ConstantPressureVolumeQuad.cpp:1167
ConstantPressureVolumeQuad(void)
null constructor
Definition: ConstantPressureVolumeQuad.cpp:97
Base class for 4 node quads.
Definition: QuadBase4N.h:45
Base class for the finite elements.
Definition: Element.h:112
int getNumDOF(void) const
return number of dofs
Definition: ConstantPressureVolumeQuad.cpp:125
const Vector & getResistingForceIncInertia(void) const
get residual with inertia terms
Definition: ConstantPressureVolumeQuad.cpp:627
const Vector & getResistingForce(void) const
get residual
Definition: ConstantPressureVolumeQuad.cpp:612
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ConstantPressureVolumeQuad.cpp:542
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ConstantPressureVolumeQuad.cpp:1199
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int update(void)
Updates the element state.
Definition: ConstantPressureVolumeQuad.cpp:129
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Element * getCopy(void) const
Virtual constructor.
Definition: ConstantPressureVolumeQuad.cpp:105
Matrix of floats.
Definition: Matrix.h:111
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ConstantPressureVolumeQuad.cpp:1185
Constant Presssure/Volume quadrilateral element for plane strain two-dimensional problems.
Definition: ConstantPressureVolumeQuad.h:65
Base class for loads over elements.
Definition: ElementalLoad.h:79
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ConstantPressureVolumeQuad.cpp:1176
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ConstantPressureVolumeQuad.cpp:109
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
void Print(std::ostream &s, int flag) const
Print stuff.
Definition: ConstantPressureVolumeQuad.cpp:277
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ConstantPressureVolumeQuad.cpp:294