MP_Constraint.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.3 $ 00022 // $Date: 2003/02/14 23:00:55 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/domain/constraints/MP_Constraint.h,v $ 00024 00025 00026 #ifndef MP_Constraint_h 00027 #define MP_Constraint_h 00028 00029 // File: ~/domain/constraints/MP_Constraint.h 00030 // 00031 // Written: fmk 00032 // Created: 11/96 00033 // Revision: A 00034 // 00035 // Purpose: This file contains the class definition for MP_Constraint. 00036 // MP_Constraint is a class which stores the information for a multi 00037 // point constraint. A multipoint constraint relates certain dof at 00038 // a constrained node to be related to certain dof at a retained node: 00039 // {Uc} = [Ccr] {Ur} 00040 // 00041 // The MP_Constraint class assumes time invariant constraints, i.e. the 00042 // constraint matrix does not change over time. All the methods are declared 00043 // as pure virtual, which will allow subclasses for time varying constraints. 00044 // 00045 // What: "@(#) MP_Constraint, revA" 00046 00047 #include <DomainComponent.h> 00048 #include <bool.h> 00049 00050 class Matrix; 00051 class ID; 00052 00053 class MP_Constraint : public DomainComponent 00054 { 00055 public: 00056 // constructors 00057 MP_Constraint( int tag , int classTag ); // Arash 00058 00059 MP_Constraint(int tag, 00060 int nodeRetain, 00061 int nodeConstr, 00062 ID &constrainedDOF, 00063 ID &retainedDOF, 00064 int classTag); 00065 00066 MP_Constraint(int tag, 00067 int nodeRetain, 00068 int nodeConstr, 00069 Matrix &constrnt, 00070 ID &constrainedDOF, 00071 ID &retainedDOF); 00072 00073 // destructor 00074 virtual ~MP_Constraint(); 00075 00076 // method to get information about the constraint 00077 virtual int getNodeRetained(void) const; 00078 virtual int getNodeConstrained(void) const; 00079 virtual const ID &getConstrainedDOFs(void) const; 00080 virtual const ID &getRetainedDOFs(void) const; 00081 virtual int applyConstraint(double pseudoTime); 00082 virtual bool isTimeVarying(void) const; 00083 virtual const Matrix &getConstraint(void); 00084 00085 // methods for output 00086 virtual int sendSelf(int commitTag, Channel &theChannel); 00087 virtual int recvSelf(int commitTag, Channel &theChannel, 00088 FEM_ObjectBroker &theBroker); 00089 00090 virtual void Print(OPS_Stream &s, int flag =0); 00091 00092 protected: 00093 00094 private: 00095 int nodeRetained; // to identify the retained node 00096 int nodeConstrained; // to identify the constrained node 00097 Matrix *constraint; // pointer to the constraint matrix 00098 ID *constrDOF; // ID of constrained DOF at constrained node 00099 ID *retainDOF; // ID of related DOF at retained node 00100 00101 int dbTag1, dbTag2; // need a dbTag for the two ID's 00102 }; 00103 00104 #endif 00105 |