xc
LagrangeDOF_Group.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.2 $
49 // $Date: 2004/10/12 21:52:25 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/model/dof_grp/LagrangeDOF_Group.h,v $
51 
52 
53 #ifndef LagrangeDOF_Group_h
54 #define LagrangeDOF_Group_h
55 
56 // File: ~/analysis/model/dof_grp/LagrangeDOF_Group.h
57 //
58 // Written: fmk
59 // Created: 02/99
60 // Revision: A
61 //
62 // Description: This file contains the class definition for LagrangeDOF_Group.
63 // A LagrangeDOF_Group object is instantiated by a LagrangeConstraintHandler for
64 // every constrained node in the domain.
65 //
66 // What: "@(#) LagrangeDOF_Group.h, revA"
67 
68 #include <solution/analysis/model/dof_grp/DOF_Group.h>
69 #include <utility/matrix/Vector.h>
70 
71 namespace XC {
72 class SFreedom_Constraint;
73 class MFreedom_Constraint;
74 class MRMFreedom_Constraint;
75 
77 //
86  {
87  private:
88  // we don't have a physical Node, so we need a persistent storage
89  // for the lagrange multipliers so that the lagrange FE can correctly compute the residual
90  Vector m_lagrange_variable;
91  protected:
92  friend class AnalysisModel;
96  public:
97  // methods to form the tangent
98  virtual const Matrix &getTangent(Integrator *theIntegrator);
99 
100  // methods to form the unbalance
101  virtual const Vector &getUnbalance(Integrator *theIntegrator);
102 
103  // methods to obtain committed responses .. always 0
104  virtual const Vector &getCommittedDisp(void) const;
105  virtual const Vector &getCommittedVel(void) const;
106  virtual const Vector &getCommittedAccel(void) const;
107  virtual const Vector &getTrialDisp() const;
108  virtual const Vector &getTrialVel() const;
109  virtual const Vector &getTrialAccel() const;
110 
111  // methods to update the trial response at the nodes
112  virtual void setNodeDisp(const Vector &u);
113  virtual void setNodeVel(const Vector &udot);
114  virtual void setNodeAccel(const Vector &udotdot);
115 
116  virtual void incrNodeDisp(const Vector &u);
117  virtual void incrNodeVel(const Vector &udot);
118  virtual void incrNodeAccel(const Vector &udotdot);
119 
120  virtual void zeroTangent(void);
121  virtual void addMtoTang(double fact = 1.0);
122  virtual void zeroUnbalance(void);
123  virtual void addPtoUnbalance(double fact = 1.0);
124  virtual void addPIncInertiaToUnbalance(double fact = 1.0);
125  virtual void addM_Force(const Vector &Udotdot, double fact = 1.0);
126 
127  virtual const Vector &getTangForce(const Vector &x, double fact = 1.0);
128  virtual const Vector &getC_Force(const Vector &x, double fact = 1.0);
129  virtual const Vector &getM_Force(const Vector &x, double fact = 1.0);
130  };
131 } // end of XC namespace
132 
133 #endif
134 
virtual void addPtoUnbalance(double fact=1.0)
Adds the product of the unbalanced load at the node and fact to the unbalance vector.
Definition: LagrangeDOF_Group.cpp:225
virtual const Vector & getTrialAccel() const
Return trial acceleration.
Definition: LagrangeDOF_Group.cpp:209
virtual const Vector & getCommittedVel(void) const
Return the committed velocity at the associated node.
Definition: LagrangeDOF_Group.cpp:184
Float vector abstraction.
Definition: Vector.h:94
A LagrangeDOF_Group object is instantiated by a LagrangeConstraintHandler for every constrained node ...
Definition: LagrangeDOF_Group.h:85
virtual const Vector & getTrialVel() const
Return trial velocity.
Definition: LagrangeDOF_Group.cpp:202
virtual const Matrix & getTangent(Integrator *theIntegrator)
Does nothing; the Lagrange FE_Elements provide coeffs to tangent.
Definition: LagrangeDOF_Group.cpp:98
virtual void setNodeDisp(const Vector &u)
Does nothing.
Definition: LagrangeDOF_Group.cpp:119
Container for FE_Element and DOF_Group objects created by the constraint handler. ...
Definition: AnalysisModel.h:134
virtual void zeroTangent(void)
To zero the tangent matrix.
Definition: LagrangeDOF_Group.cpp:222
virtual void setNodeAccel(const Vector &udotdot)
Does nothing.
Definition: LagrangeDOF_Group.cpp:144
Single freedom constraint.
Definition: SFreedom_Constraint.h:85
virtual void setNodeVel(const Vector &udot)
Does nothing.
Definition: LagrangeDOF_Group.cpp:138
virtual const Vector & getTrialDisp() const
Return trial displacement.
Definition: LagrangeDOF_Group.cpp:197
Base class for the objects that performs the integration of physical properties over the domain to fo...
Definition: Integrator.h:100
virtual void zeroUnbalance(void)
To zero the unbalance vector.
Definition: LagrangeDOF_Group.cpp:219
virtual const Vector & getCommittedDisp(void) const
To return the committed displacement at the associated node.
Definition: LagrangeDOF_Group.cpp:176
virtual void incrNodeAccel(const Vector &udotdot)
Does nothing.
Definition: LagrangeDOF_Group.cpp:172
A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domai...
Definition: DOF_Group.h:107
virtual void incrNodeVel(const Vector &udot)
Does nothing.
Definition: LagrangeDOF_Group.cpp:167
virtual const Vector & getUnbalance(Integrator *theIntegrator)
Does nothing; the Lagrange FE_Elements provide residual.
Definition: LagrangeDOF_Group.cpp:106
LagrangeDOF_Group(int tag, SFreedom_Constraint &)
Constructor.
Definition: LagrangeDOF_Group.cpp:76
Multiple retained nodes constraint.
Definition: MRMFreedom_Constraint.h:59
virtual void incrNodeDisp(const Vector &u)
Does nothing.
Definition: LagrangeDOF_Group.cpp:149
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Multi-freedom constraint.
Definition: MFreedom_Constraint.h:113
virtual void addMtoTang(double fact=1.0)
To add fact times the nodal mass matrix to the tangent matrix.
Definition: LagrangeDOF_Group.cpp:216
virtual const Vector & getCommittedAccel(void) const
Return the committed acceleration at the associated node.
Definition: LagrangeDOF_Group.cpp:191