xc
CrdTransf.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.4 $
49 // $Date: 2005/12/15 00:30:38 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/coordTransformation/CrdTransf.h,v $
51 
52 
53 // File: ~/crdTransf/CrdTransf.h
54 //
55 // Written: Remo Magalhaes de Souza (rmsouza@ce.berkeley.edu)
56 // Created: 04/2000
57 // Revision: A
58 //
59 // Description: This file contains the class definition for
60 //
61 // What: "@(#) CrdTransf.h, revA"
62 
63 #ifndef CrdTransf_h
64 #define CrdTransf_h
65 
66 #include "utility/actor/actor/MovableObject.h"
67 #include <utility/tagged/TaggedObject.h>
68 #include <utility/matrix/Vector.h>
69 
70 class Pos3dArray3d;
71 
72 namespace XC {
73 class Matrix;
74 class Node;
75 class TransfCooHandler;
76 
77 
81 //
83 //
88 class CrdTransf: public TaggedObject, public MovableObject
89  {
90  protected:
91  Node *nodeIPtr, *nodeJPtr;
92  mutable double L;
93  Vector nodeIOffset,nodeJOffset;
94  std::vector<double> nodeIInitialDisp;
95  std::vector<double> nodeJInitialDisp;
96  bool initialDispChecked;
97 
98  int set_node_ptrs(Node *nodeIPointer, Node *nodeJPointer);
99 
100  int sendData(Communicator &comm);
101  int recvData(const Communicator &comm);
102  virtual void set_rigid_joint_offsetI(const Vector &rigJntOffsetI)= 0;
103  virtual void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ)= 0;
104  public:
105  CrdTransf(int tag, int classTag, int dim_joint_offset);
106  CrdTransf(void);
107  virtual ~CrdTransf(void);
108 
109  const TransfCooHandler *GetTransfCooHandler(void) const;
111  std::string getName(void) const;
112  virtual int getDimension(void) const= 0;
113 
114  virtual int initialize(Node *node1Pointer, Node *node2Pointer) = 0;
115  virtual int update(void) = 0;
116  virtual double getInitialLength(void) const= 0;
117  virtual double getDeformedLength(void) const= 0;
118  double getLength(bool initialGeometry= true) const;
119 
120  virtual int commitState(void) = 0;
121  virtual int revertToLastCommit(void) = 0;
122  virtual int revertToStart(void) = 0;
123 
124  virtual const Vector &getBasicTrialDisp(void) const= 0;
125  virtual const Vector &getBasicIncrDisp(void) const= 0;
126  virtual const Vector &getBasicIncrDeltaDisp(void) const= 0;
127  virtual const Vector &getBasicTrialVel(void) const= 0;
128  virtual const Vector &getBasicTrialAccel(void) const= 0;
129 
130  // AddingSensitivity:BEGIN //////////////////////////////////
131  virtual const Vector &getBasicDisplSensitivity(int gradNumber);
132  virtual const Vector &getGlobalResistingForceShapeSensitivity(const Vector &, const Vector &);
133  virtual const Vector &getGlobalResistingForceShapeSensitivity(const Vector &pb, const Vector &p0, int gradNumber);
134  virtual const Vector &getBasicTrialDispShapeSensitivity(void);
135  virtual bool isShapeSensitivity(void) {return false;}
136  virtual double getdLdh(void) {return 0.0;}
137  virtual double getd1overLdh(void) {return 0.0;}
138  // AddingSensitivity:END //////////////////////////////////
139 
140  virtual const Vector &getGlobalResistingForce(const Vector &basicForce, const Vector &uniformLoad) const= 0;
141  virtual const Matrix &getGlobalStiffMatrix(const Matrix &basicStiff, const Vector &basicForce) const= 0;
142  virtual const Matrix &getInitialGlobalStiffMatrix(const Matrix &basicStiff) const= 0;
143 
144  virtual const Vector &getI(void) const= 0;
145  virtual const Vector &getJ(void) const= 0;
146  virtual Matrix getLocalAxes(bool) const= 0;
147 
148  virtual const Vector &getPointGlobalCoordFromLocal(const Vector &localCoords) const= 0;
149  virtual const Vector &getPointGlobalCoordFromBasic(const double &xi) const= 0;
150  virtual Vector getPointLocalCoordFromGlobal(const Vector &globalCoords) const= 0;
151  double getPointBasicCoordFromGlobal(const Vector &globalCoords) const;
152  const Matrix &getPointsGlobalCoordFromLocal(const Matrix &localCoords) const;
153  virtual const Matrix &getPointsGlobalCoordFromBasic(const Vector &) const= 0;
154  virtual const Vector &getPointGlobalDisplFromBasic(double xi, const Vector &basicDisps) const= 0;
155 
156  virtual const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const= 0;
157  virtual const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const= 0;
158  virtual const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const= 0;
159 
160  virtual const Matrix &getCooNodes(void) const= 0;
161  virtual const Matrix &getCooPoints(const size_t &ndiv) const= 0;
162  virtual const Vector &getCooPoint(const double &xrel) const= 0;
163 
164  };
165 } // end of XC namespace
166 
167 #endif
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
Object that can move between processes.
Definition: MovableObject.h:100
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
Node * nodeJPtr
pointers to the end nodes of the element.
Definition: CrdTransf.h:91
std::vector< double > nodeIInitialDisp
Initial displacement for I node.
Definition: CrdTransf.h:94
const TransfCooHandler * GetTransfCooHandler(void) const
Returns (if possible) a pointer to the coordinate transformation handler (owner). ...
Definition: CrdTransf.cpp:87
std::string getName(void) const
Return the name of the coordinate transformation.
Definition: CrdTransf.cpp:109
double L
element length
Definition: CrdTransf.h:92
Manager for the creation/deletion of coordinate transformations.
Definition: TransfCooHandler.h:50
Position array in a three-dimensional space.
Definition: Pos3dArray3d.h:37
std::vector< double > nodeJInitialDisp
Initial displacement for J node.
Definition: CrdTransf.h:95
Object idenfied by an integer (tag).
Definition: TaggedObject.h:92
int sendData(Communicator &comm)
Sends object members through the communicator argument.
Definition: CrdTransf.cpp:209
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Mesh node.
Definition: Node.h:111
int recvData(const Communicator &comm)
Receives object members through the communicator argument.
Definition: CrdTransf.cpp:225
virtual ~CrdTransf(void)
Destructor virtual.
Definition: CrdTransf.cpp:83
int set_node_ptrs(Node *nodeIPointer, Node *nodeJPointer)
Asigna los pointers to node dorsal y frontal.
Definition: CrdTransf.cpp:117
Vector nodeJOffset
rigid joint offsets
Definition: CrdTransf.h:93