xc
TwentySevenNodeBrick.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 //----------------------------------------------------------------------------
29 //
30 // COPYRIGHT (C): :-))
31 // PROJECT: Object Oriented Finite Element Program
32 // FILE: TwentySevenNodeBrick.h
33 // CLASS: TwentySevenNodeBrick
34 // MEMBER FUNCTIONS:
35 //
36 // MEMBER VARIABLES
37 //
38 // PURPOSE: Finite Element Class
39 // RETURN:
40 // VERSION:
41 // LANGUAGE: C++.ver >= 3.0
42 // TARGET OS: all
43 // DESIGNER: Boris Jeremic, Guanzhou Jie
44 // PROGRAMMER: Guanzhou Jie and Boris Jeremic
45 // DATE: Oct. 2003
46 // UPDATE HISTORY:
47 //
49 //
50 
51 
52 
53 #ifndef TWENTYSEVENNODEBRICK_H
54 #define TWENTYSEVENNODEBRICK_H
55 
56 #include <domain/mesh/element/ElementBase.h>
57 #include "domain/mesh/element/utils/body_forces/BodyForces3D.h"
58 
59 
60 
61 namespace XC {
62 class Node;
63 class MatPoint3D;
64 class BJtensor;
65 class stresstensor;
66 
71  {
72  private:
73  double determinant_of_Jacobian;
74  NDMaterial *mmodel;
75  int r_integration_order;
76  int s_integration_order;
77  int t_integration_order;
78 
79  // Now I want 3D array of Material points!
80  // MatPoint3D[r_integration_order][s_integration_order][t_integration_order]
81  // 3D array of Material points
82  std::vector<MatPoint3D> matpoint;
83 
84  // this is LM array. This array holds DOFs for this element
85  //int LM[60]; // for 20noded x 3 = 60
86 
87  int numDOF;
88 
89  mutable Matrix *Ki;
90 
91  static Matrix K;
92  static Matrix C;
93  static Matrix M;
94  static Vector P;
95  BodyForces3D bf;
96 
97  // double thickness; // Element thickness
98  double rho;
99  double pressure;
100  int order;
101 
102  //Matrix J; //!< Jacobian of transformation
103  //Matrix L; //!< Inverse of J
104  //Matrix B; //!< Strain interpolation matrix
105  public:
106  TwentySevenNodeBrick(int element_number,
107  int node_numb_1, int node_numb_2, int node_numb_3, int node_numb_4,
108  int node_numb_5, int node_numb_6, int node_numb_7, int node_numb_8,
109  int node_numb_9, int node_numb_10, int node_numb_11, int node_numb_12,
110  int node_numb_13, int node_numb_14, int node_numb_15, int node_numb_16,
111  int node_numb_17, int node_numb_18, int node_numb_19, int node_numb_20,
112  int node_numb_21, int node_numb_22, int node_numb_23, int node_numb_24,
113  int node_numb_25, int node_numb_26, int node_numb_27,
114  NDMaterial * Globalmmodel, const BodyForces3D &,
115  double r, double p);
116  TwentySevenNodeBrick(void);
117  Element *getCopy(void) const;
119 
120  int getNumDOF(void) const;
121  void setDomain(Domain *theDomain);
122 
123  // public methods to set the state of the element
124  int commitState(void);
125  int revertToLastCommit(void);
126  int revertToStart(void);
127 
128  // update, Guanzhou added Apr. 2004 to update incremental strain in the domain
129  int update(void);
130 
131  // public methods to obtain stiffness, mass, damping and residual information
132  // We haven't build the following functions.
133  // All the value of K M Dmp and F are nothing.
134  const Matrix &getTangentStiff(void) const;
135  const Matrix &getInitialStiff(void) const;
136  const Matrix &getMass(void) const;
137 
138  const Matrix &getConsMass(void) const;
139  const Matrix &getLumpedMass(void) const;
140 
141  void alive(void);
142  int addLoad(ElementalLoad *theLoad, double loadFactor);
143  //int addLoad(const Vector &addP);
144  int addInertiaLoadToUnbalance(const Vector &accel);
145  const Vector FormEquiBodyForce(void);
146  const Vector &getResistingForce(void) const;
147  const Vector &getResistingForceIncInertia(void) const;
148 
149  virtual int sendSelf(Communicator &);
150  virtual int recvSelf(const Communicator &);
151 
152  void Print(std::ostream &s, int flag =0) const;
153  // Do nothing with void Print(std::ostream &s, int flag =0);
154  // use Brick3D report. 08/16/00
155  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
156  int getResponse (int responseID, Information &eleInformation);
157 
158  public:
159 
160  void incremental_Update(void);
161  //void iterative_Update(void);
162 
163  static BJtensor H_3D(double r1, double r2, double r3);
164  BJtensor interp_poli_at(double r, double s, double t);
165  static BJtensor dh_drst_at(double r, double s, double t);
166 
167 
168  TwentySevenNodeBrick & operator[](int subscript);
169 
170  BJtensor getStiffnessTensor(void) const;
171 
172  void set_strain_stress_tensor(FILE *fp, double * u);
173  BJtensor getMassTensor(void) const;
174 
175  BJtensor Jacobian_3D(const BJtensor &dh) const;
176  BJtensor Jacobian_3Dinv(const BJtensor &dh) const;
177  BJtensor Nodal_Coordinates(void) const;
178 
179  BJtensor incr_disp(void) const;
180  BJtensor total_disp(void) const;
181 
182  BJtensor total_disp(FILE *fp, double * u);
183 
185  BJtensor mass_matrix(const BJtensor &);
186 
187 
188  int get_global_number_of_node(int local_node_number);
189  int get_Brick_Number(void);
190 
191 
192  //int * get_LM(void);
193  //void set_LM(Node * node); // commented out temporarily 09-27-2000 Zhaohui
194 
195  //these two files are originally in fe.h
196  static double get_Gauss_p_c(short order, short point_numb);
197  static double get_Gauss_p_w(short order, short point_numb);
198 
199  // returns nodal forces for given stress field in an element
200  BJtensor nodal_forces(void) const;
201  // returns nodal forces for ITERATIVE stress field in an element
202  BJtensor iterative_nodal_forces(void) const;
203  // returns nodal forces for given constant stress field in the element
204  BJtensor nodal_forces_from_stress(stresstensor &) const;
205  // returns nodal forces for given incremental strain field in an element
206  // by using the linearized constitutive BJtensor from the beginning of the step !
207  BJtensor linearized_nodal_forces(void) const;
208 
209  // updates Material point stresses and strains from given displacements
210  BJtensor update_stress_strain(BJtensor & disp);
211 
212  void report(char *);
213  void reportshort(char *);
214  void reportPAK(char *);
215  void reportpqtheta(int);
216  //void reportLM(char *);
217  void computeGaussPoint(void);
218  void reportCIPIC(char *);
219  void reportTensorF(FILE *);
220  Vector getWeightofGP(void);
221 
222 
223  // Setting initial E according to the initial pressure
224  //void setInitE(void);
225  //void reportStressTensorF(FILE *);
226 
227 };
228 } // end of XC namespace
229 
230 
231 #endif
232 
int revertToStart(void)
Reverts the element to its initial state.
Definition: TwentySevenNodeBrick.cpp:3042
BJtensor mass_matrix(const BJtensor &)
Returns the mass matrix.
Definition: TwentySevenNodeBrick.cpp:1328
Float vector abstraction.
Definition: Vector.h:94
Twenty seven node hexahedral element for three-dimensional problems.
Definition: TwentySevenNodeBrick.h:70
int revertToLastCommit(void)
Revert to the last committed state.
Definition: TwentySevenNodeBrick.cpp:3017
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: TwentySevenNodeBrick.cpp:2880
Stress tensor.
Definition: stresst.h:70
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
virtual int sendSelf(Communicator &)
Send the object.
Definition: TwentySevenNodeBrick.cpp:3813
Base class response objects.
Definition: Response.h:81
Boris Jeremic tensor class.
Definition: BJtensor.h:112
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: TwentySevenNodeBrick.cpp:2876
BJtensor Nodal_Coordinates(void) const
Returns the coordinates of the nodes.
Definition: TwentySevenNodeBrick.cpp:1362
BJtensor getMassTensor(void) const
Returns the tensor de masas.
Definition: TwentySevenNodeBrick.cpp:1197
Base class for the finite elements.
Definition: Element.h:112
void alive(void)
Reactivates the element.
Definition: TwentySevenNodeBrick.cpp:3181
void set_strain_stress_tensor(FILE *fp, double *u)
Asigna el stiffness tensor.
Definition: TwentySevenNodeBrick.cpp:1108
Body forces over an element.
Definition: BodyForces3D.h:40
int commitState(void)
Commit the current element state.
Definition: TwentySevenNodeBrick.cpp:2887
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: TwentySevenNodeBrick.cpp:3668
BJtensor getStiffnessTensor(void) const
Returns the stiffness tensor.
Definition: TwentySevenNodeBrick.cpp:909
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: TwentySevenNodeBrick.cpp:3144
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: TwentySevenNodeBrick.cpp:3067
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
Element * getCopy(void) const
Virtual constructor.
Definition: TwentySevenNodeBrick.cpp:195
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: TwentySevenNodeBrick.cpp:3958
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: TwentySevenNodeBrick.cpp:3828
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: TwentySevenNodeBrick.cpp:3643
BJtensor stiffness_matrix(const BJtensor &)
Returns the stiffness matrix.
Definition: TwentySevenNodeBrick.cpp:1298
virtual int recvSelf(const Communicator &)
Receive the object.
Definition: TwentySevenNodeBrick.cpp:3820
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:47
Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: TwentySevenNodeBrick.cpp:3896
int update(void)
Updates the element state.
Definition: TwentySevenNodeBrick.cpp:4940
Matrix of floats.
Definition: Matrix.h:111
Base class for loads over elements.
Definition: ElementalLoad.h:79
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
TwentySevenNodeBrick(void)
Constructor.
Definition: TwentySevenNodeBrick.cpp:187
~TwentySevenNodeBrick()
Destructor.
Definition: TwentySevenNodeBrick.cpp:199