XC Open source finite element analysis program
MFreedom_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: 2003/02/14 23:00:55 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/domain/constraints/MFreedom_Constraint.h,v $
50 
51 
52 #ifndef MFreedom_Constraint_h
53 #define MFreedom_Constraint_h
54 
55 // File: ~/domain/constraints/MFreedom_Constraint.h
56 //
57 // Written: fmk
58 // Created: 11/96
59 // Revision: A
60 //
61 // Purpose: This file contains the class definition for MFreedom_Constraint.
62 // MFreedom_Constraint is a class
63 //
64 // What: "@(#) MFreedom_Constraint, revA"
65 
66 #include "MFreedom_ConstraintBase.h"
67 #include <utility/matrix/Matrix.h>
68 
69 
70 namespace XC {
71 class ID;
72 
74 //
85  {
86  protected:
88 
90 
91  void set_retained_dofs(const ID &);
92  void set_constrained_retained_dofs(const ID &constrainedDOF,const ID &retainedDOF);
93  protected:
94  int sendData(CommParameters &cp);
95  int recvData(const CommParameters &cp);
96  public:
97  // constructors
98  MFreedom_Constraint(int tag , int classTag ); // Arash
99  MFreedom_Constraint(int tag); // LCPT
100 
101  MFreedom_Constraint(int tag,int nodeRetain, int nodeConstr, int classTag);
102 
103  MFreedom_Constraint(int tag,int nodeRetain, int nodeConstr, const ID &constrainedDOF, const ID &retainedDOF);
104  MFreedom_Constraint(int tag,int nodeRetain, int nodeConstr, const ID &constrainedDOF, const ID &retainedDOF,int classTag);
105 
106  MFreedom_Constraint(int tag,int nodeRetain, int nodeConstr, Matrix &constrnt,ID &constrainedDOF,ID &retainedDOF);
107 
108  // methods to get information about the constraint
110  virtual inline const int &getNodeRetained(void) const
111  { return retainedNodeTag; }
113  virtual inline int &getNodeRetained(void)
114  { return retainedNodeTag; }
116  virtual size_t getNumRetainedNodes(void) const
117  { return 1; }
118  std::vector<XC::Node *> getPointersToRetainedNodes(void) const;
119  bool affectsNode(int ) const;
120  virtual const ID &getRetainedDOFs(void) const;
121  virtual int applyConstraint(double pseudoTime);
122 
123  // methods for output
124  virtual int sendSelf(CommParameters &);
125  virtual int recvSelf(const CommParameters &);
126 
127  int getVtkCellType(void) const;
128  int getMEDCellType(void) const;
129 
130  virtual void Print(std::ostream &s, int flag =0);
131 
132  };
133 } // end of XC namespace
134 
135 #endif
136 
int retainedNodeTag
Tag of the retained node.
Definition: MFreedom_Constraint.h:87
MFreedom_Constraint(int tag, int classTag)
!
Definition: MFreedom_Constraint.cpp:90
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: MFreedom_Constraint.cpp:195
std::vector< XC::Node * > getPointersToRetainedNodes(void) const
Returns a vector with the pointers to the retained nodes.
Definition: MFreedom_Constraint.cpp:158
virtual int applyConstraint(double pseudoTime)
Applies the constraint at the pseudo-time being passed as parameter.
Definition: MFreedom_Constraint.cpp:170
int sendData(CommParameters &cp)
Sends data through the channel being passed as parameter.
Definition: MFreedom_Constraint.cpp:177
virtual void Print(std::ostream &s, int flag=0)
Printing.
Definition: MFreedom_Constraint.cpp:221
bool affectsNode(int) const
Returns true ifafecta to the node cuyo tag being passed as parameter.
Definition: MFreedom_Constraint.cpp:147
void set_constrained_retained_dofs(const ID &constrainedDOF, const ID &retainedDOF)
Sets the retained and constrained degrees of freedom.
Definition: MFreedom_Constraint.cpp:83
virtual size_t getNumRetainedNodes(void) const
Returns the number of retained nodes.
Definition: MFreedom_Constraint.h:116
Definition: ID.h:77
ID retainDOF
ID of retained DOF at retained node.
Definition: MFreedom_Constraint.h:89
Definition: Matrix.h:82
Base class for mult-freedom constraints.
Definition: MFreedom_ConstraintBase.h:57
virtual const ID & getRetainedDOFs(void) const
Returns the identifiers of the retained degrees of freedom.
Definition: MFreedom_Constraint.cpp:151
virtual const int & getNodeRetained(void) const
Returns the tag of the retained (or master) node.
Definition: MFreedom_Constraint.h:110
int getVtkCellType(void) const
Interfaz con VTK.
Definition: MFreedom_Constraint.cpp:233
int recvData(const CommParameters &cp)
Receives data through the channel being passed as parameter.
Definition: MFreedom_Constraint.cpp:186
Multi-freedom constraint. Objectt of this class store the information for a multifreedom constraint...
Definition: MFreedom_Constraint.h:84
void set_retained_dofs(const ID &)
Sets the retained degrees of freedom.
Definition: MFreedom_Constraint.cpp:79
Communication parameters between processes.
Definition: CommParameters.h:65
virtual int & getNodeRetained(void)
Returns the tag of the retained (or master) node.
Definition: MFreedom_Constraint.h:113
================================================================================
Definition: ContinuaReprComponent.h:34
int getMEDCellType(void) const
Interface with Salome MED format.
Definition: MFreedom_Constraint.cpp:240
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: MFreedom_Constraint.cpp:208