XC Open source finite element analysis program
DriftRecorder.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.9 $
48 // $Date: 2005/03/30 20:12:10 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/recorder/DriftRecorder.h,v $
50 
51 #ifndef DriftRecorder_h
52 #define DriftRecorder_h
53 
54 // Written: MHS
55 // Created: Oct 2001
56 //
57 // Description: This file contains the class definition for
58 // DriftRecorder.
59 
60 #include "HandlerRecorder.h"
61 #include <vector>
62 #include "utility/matrix/Vector.h"
63 
64 namespace XC {
65 class Domain;
66 class DataOutputHandler;
67 class Node;
68 class ID;
69 
71 //
76  {
77  private:
78  int initialize(void);
79 
80  ID *ndI;
81  ID *ndJ;
82  std::vector<Node *> theNodes;
83  int dof;
84  int perpDirn;
85  Vector oneOverL;
86  Vector data;
87  int numNodes;
88  protected:
89  void libera_nodes(void);
90  int alloc_nodes(const int &,const int &);
91  void libera_ndIJ(void);
92  void alloc_ndIJ(const int &);
93  void set_ndIJ(const ID &nI,const ID &);
94  void setup_ndIJ(const int &);
95 
96  public:
97  DriftRecorder(void);
98  DriftRecorder(int ndI, int ndJ, int dof, int perpDirn,
99  Domain &theDomain,
101  bool echoTime = false);
102 
103  DriftRecorder(const ID &ndI, const ID &ndJ, int dof, int perpDirn,
104  Domain &theDomain,
105  DataOutputHandler &theHandler,
106  bool echoTime = false);
107 
108  ~DriftRecorder(void);
109 
110  int record(int commitTag, double timeStamp);
111  int restart(void);
112 
113  int sendSelf(CommParameters &);
114  int recvSelf(const CommParameters &);
115  };
116 } // end of XC namespace
117 
118 #endif
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
int sendSelf(CommParameters &)
Sends the object through the communicator being passed as parameter.
Definition: DriftRecorder.cpp:384
Records relative displacement between nodes. The drift is taken as the ratio between the prescribed r...
Definition: DriftRecorder.h:75
Definition: ID.h:77
int recvSelf(const CommParameters &)
Receives the object through the communicator being passed as parameter.
Definition: DriftRecorder.cpp:403
DataOutputHandler * theHandler
Output handler (TO DEPRECATE).
Definition: HandlerRecorder.h:45
Definition: DataOutputHandler.h:61
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for recorders that get the response of one or more nodes during the analysis.
Definition: HandlerRecorder.h:42
================================================================================
Definition: ContinuaReprComponent.h:34