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/tagged/TaggedObject.h"
56 #include "utility/actor/actor/MovableObject.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 class BeamIntegratorHandler;
68 
72 //
82  {
83  public:
84  BeamIntegration(int tag, int classTag);
85  inline virtual ~BeamIntegration(void) {}
86 
89  std::string getName(void) const;
90 
91  virtual void getSectionWeights(int nIP, double L, double *wt) const= 0;
92  boost::python::list getSectionWeightsPy(int nIP, double L) const;
93  const Vector &getIntegrPointWeights(int nIP, double L) const;
94 
95  virtual void getSectionLocations(int nIP, double L, double *xi) const= 0;
96  boost::python::list getSectionLocationsPy(int nIP, double L) const;
97  const Matrix &getIntegrPointCoords(int nIP, double L) const;
98  const Matrix &getIntegrPointNaturalCoords(int nIP, double L) const;
99  const Matrix &getIntegrPointLocalCoords(int nIP, double L) const;
100 
101  const Matrix &getIntegrPointNaturalCoords(int nIP,const CrdTransf &trf) const;
102  const Matrix &getIntegrPointNormalizedCoords(int nIP,const CrdTransf &trf) const;
103  const Matrix &getIntegrPointLocalCoords(int nIP,const CrdTransf &trf) const;
104  const Matrix &getIntegrPointGlobalCoords(int nIP,const CrdTransf &trf) const;
105 
106  const Vector &evalInIntegrPoints(const ExprAlgebra &expr,int nIP,const CrdTransf &trf) const;
107  double getIntegral(const ExprAlgebra &expr,int nIP,const CrdTransf &trf) const;
108 
109  virtual void addElasticDeformations(ElementalLoad *,double loadFactor,double L,FVector &v0) {return;}
110  // Return 0 if there is no elastic interior, -1 otherwise
111  virtual int addElasticFlexibility(double L, Matrix &fe) {return 0;}
112 
113  virtual double getTangentDriftI(double L, double LI, double q2,double q3, bool yAxis = false) {return 0.0;}
114  virtual double getTangentDriftJ(double L, double LI, double q2,double q3, bool yAxis = false) {return 0.0;}
115 
116  virtual BeamIntegration *getCopy(void) const= 0;
117 
118  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
119  virtual int updateParameter(int parameterID, Information &info);
120  virtual int activateParameter(int parameterID);
121 
122  virtual void getLocationsDeriv(int nIP, double L, double dLdh,double *dptsdh);
123  virtual void getWeightsDeriv(int nIP, double L, double dLdh,double *dwtsdh);
124  // Return 0 if there is no elastic interior, -1 otherwise
125  virtual int addElasticFlexDeriv(double L, Matrix &dfedh,double dLdh = 0.0) {return 0;}
126 
127  virtual void Print(std::ostream &s, int flag = 0) const=0;
128 
129  };
130 
131 int sendBeamIntegrationPtr(BeamIntegration *,int posClassTag, int posDbTag,DbTagData &,Communicator &);
132 BeamIntegration *receiveBeamIntegrationPtr(BeamIntegration *,int posClassTag, int posDbTag,DbTagData &,const Communicator &);
133 
134 } // end of XC namespace
135 
136 #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:230
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:247
const Matrix & getIntegrPointNormalizedCoords(int nIP, const CrdTransf &trf) const
Returns a matrix with the normalized coordinates for each integration point.
Definition: BeamIntegration.cpp:186
virtual BeamIntegration * getCopy(void) const =0
Virtual constructor.
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:128
const Matrix & getIntegrPointLocalCoords(int nIP, double L) const
Returns the local coordinates (between 0 and L) from the normalized ones.
Definition: BeamIntegration.cpp:172
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: BeamIntegration.cpp:96
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:161
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:206
std::string getName(void) const
Returns the name of the material.
Definition: BeamIntegration.cpp:87
const BeamIntegratorHandler * getBeamIntegratorHandler(void) const
Returns (if possible) a pointer to the beam integration handler (owner).
Definition: BeamIntegration.cpp:65
boost::python::list getSectionLocationsPy(int nIP, double L) const
Returns the location of the sections along the element.
Definition: BeamIntegration.cpp:139
Base class for integration on beam elements.
Definition: BeamIntegration.h:81
const Vector & getIntegrPointWeights(int nIP, double L) const
Returns the weights (between 0 and 1).
Definition: BeamIntegration.cpp:118
Object idenfied by an integer (tag).
Definition: TaggedObject.h:92
const Matrix & getIntegrPointGlobalCoords(int nIP, const CrdTransf &trf) const
Returns a matrix with the global coordinates for each integration point.
Definition: BeamIntegration.cpp:202
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:102
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: BeamIntegration.cpp:99
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
Beam integrators handler.
Definition: BeamIntegratorHandler.h:42
virtual void Print(std::ostream &s, int flag=0) const =0
Print stuff.
double getIntegral(const ExprAlgebra &expr, int nIP, const CrdTransf &trf) const
Returns the integral of the expression.
Definition: BeamIntegration.cpp:213
const Matrix & getIntegrPointCoords(int nIP, double L) const
Returns the normalized coordinates (entre 0 y 1).
Definition: BeamIntegration.cpp:150