xc
BeamIntegration.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.6 $
49 // $Date: 2006/01/17 21:24:00 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/forceBeamColumn/BeamIntegration.h,v $
51 
52 #ifndef BeamIntegration_h
53 #define BeamIntegration_h
54 
55 #include <utility/actor/actor/MovableObject.h>
56 #include "utility/kernel/CommandEntity.h"
57 
58 class ExprAlgebra;
59 
60 namespace XC {
61 class Matrix;
62 class ElementalLoad;
63 class Information;
64 class FVector;
65 class CrdTransf;
66 class Vector;
67 
71 //
81  {
82  public:
83  BeamIntegration(int classTag);
84  inline virtual ~BeamIntegration(void) {}
85 
86  virtual void getSectionWeights(int nIP, double L, double *wt) const= 0;
87  boost::python::list getSectionWeightsPy(int nIP, double L) const;
88  const Vector &getIntegrPointWeights(int nIP, double L) const;
89 
90  virtual void getSectionLocations(int nIP, double L, double *xi) const= 0;
91  boost::python::list getSectionLocationsPy(int nIP, double L) const;
92  const Matrix &getIntegrPointCoords(int nIP, double L) const;
93  const Matrix &getIntegrPointNaturalCoords(int nIP, double L) const;
94  const Matrix &getIntegrPointLocalCoords(int nIP, double L) const;
95 
96  const Matrix &getIntegrPointNaturalCoords(int nIP,const CrdTransf &trf) const;
97  const Matrix &getIntegrPointNormalizedCoords(int nIP,const CrdTransf &trf) const;
98  const Matrix &getIntegrPointLocalCoords(int nIP,const CrdTransf &trf) const;
99  const Matrix &getIntegrPointGlobalCoords(int nIP,const CrdTransf &trf) const;
100 
101  const Vector &evalInIntegrPoints(const ExprAlgebra &expr,int nIP,const CrdTransf &trf) const;
102  double getIntegral(const ExprAlgebra &expr,int nIP,const CrdTransf &trf) const;
103 
104  virtual void addElasticDeformations(ElementalLoad *,double loadFactor,double L,FVector &v0) {return;}
105  // Return 0 if there is no elastic interior, -1 otherwise
106  virtual int addElasticFlexibility(double L, Matrix &fe) {return 0;}
107 
108  virtual double getTangentDriftI(double L, double LI, double q2,double q3, bool yAxis = false) {return 0.0;}
109  virtual double getTangentDriftJ(double L, double LI, double q2,double q3, bool yAxis = false) {return 0.0;}
110 
111  virtual BeamIntegration *getCopy(void) const= 0;
112 
113  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
114  virtual int updateParameter(int parameterID, Information &info);
115  virtual int activateParameter(int parameterID);
116 
117  virtual void getLocationsDeriv(int nIP, double L, double dLdh,double *dptsdh);
118  virtual void getWeightsDeriv(int nIP, double L, double dLdh,double *dwtsdh);
119  // Return 0 if there is no elastic interior, -1 otherwise
120  virtual int addElasticFlexDeriv(double L, Matrix &dfedh,double dLdh = 0.0) {return 0;}
121 
122  virtual void Print(std::ostream &s, int flag = 0) const=0;
123 
124  };
125 
126 int sendBeamIntegrationPtr(BeamIntegration *,int posClassTag, int posDbTag,DbTagData &,Communicator &);
127 BeamIntegration *receiveBeamIntegrationPtr(BeamIntegration *,int posClassTag, int posDbTag,DbTagData &,const Communicator &);
128 
129 } // end of XC namespace
130 
131 #endif
Element internal forces.
Definition: FVector.h:45
Float vector abstraction.
Definition: Vector.h:94
int sendBeamIntegrationPtr(BeamIntegration *, int posClassTag, int posDbTag, DbTagData &, Communicator &)
Send a pointer to material through the communicator argument.
Definition: BeamIntegration.cpp:196
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
BeamIntegration * receiveBeamIntegrationPtr(BeamIntegration *, int posClassTag, int posDbTag, DbTagData &, const Communicator &)
Receive a pointer to beam integration through the communicator argument.
Definition: BeamIntegration.cpp:213
const Matrix & getIntegrPointNormalizedCoords(int nIP, const CrdTransf &trf) const
Returns a matrix with the normalized coordinates for each integration point.
Definition: BeamIntegration.cpp:152
Object that can move between processes.
Definition: MovableObject.h:100
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
boost::python::list getSectionWeightsPy(int nIP, double L) const
Return the weights corresponding to each section.
Definition: BeamIntegration.cpp:94
const Matrix & getIntegrPointLocalCoords(int nIP, double L) const
Returns the local coordinates (between 0 and L) from the normalized ones.
Definition: BeamIntegration.cpp:138
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: BeamIntegration.cpp:62
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const Matrix & getIntegrPointNaturalCoords(int nIP, double L) const
Returns the natural coordinates (between -1 and 1) from the normalized ones.
Definition: BeamIntegration.cpp:127
const Vector & evalInIntegrPoints(const ExprAlgebra &expr, int nIP, const CrdTransf &trf) const
Returns the values of the expression being passed as parameter on each integration point...
Definition: BeamIntegration.cpp:172
boost::python::list getSectionLocationsPy(int nIP, double L) const
Returns the location of the sections along the element.
Definition: BeamIntegration.cpp:105
Base class for integration on beam elements.
Definition: BeamIntegration.h:80
Objet that can execute python scripts.
Definition: CommandEntity.h:40
const Vector & getIntegrPointWeights(int nIP, double L) const
Returns the weights (between 0 and 1).
Definition: BeamIntegration.cpp:84
const Matrix & getIntegrPointGlobalCoords(int nIP, const CrdTransf &trf) const
Returns a matrix with the global coordinates for each integration point.
Definition: BeamIntegration.cpp:168
Expresión algebraica.
Definition: ExprAlgebra.h:32
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: BeamIntegration.cpp:68
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: BeamIntegration.cpp:65
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
double getIntegral(const ExprAlgebra &expr, int nIP, const CrdTransf &trf) const
Returns the integral of the expression.
Definition: BeamIntegration.cpp:179
const Matrix & getIntegrPointCoords(int nIP, double L) const
Returns the normalized coordinates (entre 0 y 1).
Definition: BeamIntegration.cpp:116