xc
NodeDispVectors.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 //NodeDispVectors
29 
30 
31 #ifndef NodeDispVectors_h
32 #define NodeDispVectors_h
33 
34 #include "NodeVectors.h"
35 
36 namespace XC {
37 
39 //
43  {
44  private:
45  int createDisp(const size_t &);
46 
47  Vector *incrDisp;
48  Vector *incrDeltaDisp;
49  protected:
50  void free_mem(void);
51  public:
52  // constructors
53  NodeDispVectors(void);
55  NodeDispVectors &operator=(const NodeDispVectors &);
56  virtual ~NodeDispVectors(void);
57 
58  // public methods for obtaining committed and trial
59  // response quantities of the node
60  virtual const Vector &getIncrDisp(const size_t &) const;
61  virtual const Vector &getIncrDeltaDisp(const size_t &) const;
62 
63  // public methods for updating the trial response quantities
64  virtual int setTrialDispComponent(const size_t &nDOF,const double &value,const size_t &dof);
65  virtual int setTrialDisp(const size_t &nDOF,const Vector &);
66  virtual int incrTrialDisp(const size_t &nDOF,const Vector &);
67 
68  // public methods dealing with the committed state of the node
69  virtual int commitState(const size_t &nDOF);
70  virtual int revertToLastCommit(const size_t &nDOF);
71 
72  virtual void Print(std::ostream &s, int flag = 0) const;
73  };
74 
75 } // end of XC namespace
76 
77 #endif
78 
virtual int incrTrialDisp(const size_t &nDOF, const Vector &)
Increments trial displacements.
Definition: NodeDispVectors.cc:171
Float vector abstraction.
Definition: Vector.h:94
virtual int revertToLastCommit(const size_t &nDOF)
Returns the vectors to its last committed value.
Definition: NodeDispVectors.cc:229
Vectors to store trial and committed values of node displacement, velocity, etc.
Definition: NodeVectors.h:48
virtual void Print(std::ostream &s, int flag=0) const
Printing.
Definition: NodeDispVectors.cc:245
virtual ~NodeDispVectors(void)
destructor
Definition: NodeDispVectors.cc:62
virtual int setTrialDispComponent(const size_t &nDOF, const double &value, const size_t &dof)
Sets trial values for the displacement components.
Definition: NodeDispVectors.cc:100
virtual const Vector & getIncrDeltaDisp(const size_t &) const
Returns delta displacement increment.
Definition: NodeDispVectors.cc:83
Vectors to store trial and committed values («committed») on node displacements.
Definition: NodeDispVectors.h:42
virtual const Vector & getIncrDisp(const size_t &) const
Returns displacement increment.
Definition: NodeDispVectors.cc:67
virtual int commitState(const size_t &nDOF)
Commits state of displacement vectors.
Definition: NodeDispVectors.cc:211
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
NodeDispVectors(void)
Constructor.
Definition: NodeDispVectors.cc:46
virtual int setTrialDisp(const size_t &nDOF, const Vector &)
Sets trial values for the displacement vector.
Definition: NodeDispVectors.cc:134