XC Open source finite element analysis program
SFreedom_Constraint.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.3 $
48 // $Date: 2005/11/22 19:41:17 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/domain/constraints/SFreedom_Constraint.h,v $
50 
51 
52 #ifndef SFreedom_Constraint_h
53 #define SFreedom_Constraint_h
54 
55 // Written: fmk
56 // Created: 11/96
57 // Revision: A
58 //
59 // Purpose: This file contains the class definition for SFreedom_Constraint.
60 // SFreedom_Constraint is a class which stores the information for a single
61 // DOF constraint. Each single point constraint specifies a particular
62 // degree-of-freedom response (displacement, rotation) at a node.
63 // The constraint may be time-varying .. time varying constarints however
64 // must be implemented using subclasses.
65 //
66 // What: "@(#) SFreedom_Constraint, revA"
67 
68 #include "Constraint.h"
69 
70 namespace XC {
71  class ID;
72 
75 //
77 //
80  {
81  protected:
82  int dofNumber;
83  double valueR;
84  double valueC;
85  bool isConstant;
86  int loadPatternTag;
87 
88  DbTagData &getDbTagData(void) const;
89  int sendData(CommParameters &cp);
90  int recvData(const CommParameters &cp);
91 
92  public:
93  // constructors
94  SFreedom_Constraint(int classTag);
95  SFreedom_Constraint(int spTag, int nodeTag);
96  SFreedom_Constraint(int spTag, int nodeTag, int ndof, int classTag);
97  SFreedom_Constraint(int spTag, int nodeTag, int ndof, double value, bool isConstant= true);
98  virtual SFreedom_Constraint *getCopy(void) const;
99  SFreedom_Constraint *getCopy(const int &) const;
100 
101  virtual int getDOF_Number(void) const;
102  virtual int applyConstraint(double loadFactor);
103  virtual double getValue(void) const;
104  virtual bool isHomogeneous(void) const;
105  virtual void setLoadPatternTag(int loadPaternTag);
106  virtual int getLoadPatternTag(void) const;
107 
108  int getVtkCellType(void) const;
109 
110  int sendSelf(CommParameters &);
111  int recvSelf(const CommParameters &);
112 
113  virtual void Print(std::ostream &s, int flag =0);
114  };
115 } // end of XC namespace
116 
117 #endif
118 
119 
int sendData(CommParameters &cp)
Sends data through the channel being passed as parameter.
Definition: SFreedom_Constraint.cpp:166
virtual int getLoadPatternTag(void) const
Returns the load pattern tag of the constraint.
Definition: SFreedom_Constraint.cpp:154
int dofNumber
identifies which of the nodes dof is constrained
Definition: SFreedom_Constraint.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
int recvData(const CommParameters &cp)
Receives data through the channel being passed as parameter.
Definition: SFreedom_Constraint.cpp:176
bool isConstant
flag indicating if constant
Definition: SFreedom_Constraint.h:85
Base class for model constraints.
Definition: Constraint.h:49
virtual SFreedom_Constraint * getCopy(void) const
Virtual constructor.
Definition: SFreedom_Constraint.cpp:107
virtual double getValue(void) const
Returns the valor del desplazamiento impuesto.
Definition: SFreedom_Constraint.cpp:124
virtual void setLoadPatternTag(int loadPaternTag)
Sets the load pattern tag for the constraint.
Definition: SFreedom_Constraint.cpp:149
virtual int applyConstraint(double loadFactor)
Applies the constraint with the load factor being passed as parameter.
Definition: SFreedom_Constraint.cpp:129
SFreedom_Constraint(int classTag)
Default constructor.
Definition: SFreedom_Constraint.cpp:72
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: SFreedom_Constraint.cpp:186
virtual void Print(std::ostream &s, int flag=0)
Prints constraint information.
Definition: SFreedom_Constraint.cpp:217
virtual bool isHomogeneous(void) const
Returns true if it&#39;s an homogeneous constraint (prescribed value for the DOF is zero).
Definition: SFreedom_Constraint.cpp:139
int getVtkCellType(void) const
Returns the cell type to be used to represent the object in VTK graphics.
Definition: SFreedom_Constraint.cpp:212
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: SFreedom_Constraint.cpp:198
virtual int getDOF_Number(void) const
Returns the constrained DOF number.
Definition: SFreedom_Constraint.cpp:119
Single freedom constraint.
Definition: SFreedom_Constraint.h:79
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
double valueR
the reference value
Definition: SFreedom_Constraint.h:83
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: SFreedom_Constraint.cpp:159
double valueC
if constant = the reference value, if not constant = the reference value * load factor ...
Definition: SFreedom_Constraint.h:84