xc
IntegratorVectors.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 //IntegratorVectors.h
29 
30 #ifndef IntegratorVectors_h
31 #define IntegratorVectors_h
32 
33 #include "utility/actor/actor/MovableObject.h"
34 #include "utility/matrix/Vector.h"
35 
36 namespace XC {
37 
39 //
42  {
43  protected:
44  Vector deltaUhat, deltaUbar, deltaU, deltaUstep;
45  Vector phat; // the reference load vector
46  double deltaLambdaStep, currentLambda;
47 
48  void resize(const int &size);
49  int sendData(Communicator &);
50  int recvData(const Communicator &);
51  public:
52  IntegratorVectors(void);
53 
54  inline const Vector &getPhat(void) const
55  { return phat; }
56  inline Vector &getPhat(void)
57  { return phat; }
58 
59  inline const Vector &getDeltaUhat(void) const
60  { return deltaUhat; }
61  inline void setDeltaUhat(const Vector &v)
62  { deltaUhat= v; }
63 
64  inline const Vector &getDeltaUbar(void) const
65  { return deltaUbar; }
66  inline void setDeltaUbar(const Vector &v)
67  { deltaUbar= v; }
68 
69  inline const Vector &getDeltaUstep(void) const
70  { return deltaUstep; }
71  inline void setDeltaUstep(const Vector &v)
72  { deltaUstep= v; }
73 
74  inline const Vector &getDeltaU(void) const
75  { return deltaU; }
76  inline void setDeltaU(const Vector &v)
77  { deltaU= v; }
78 
79  inline const double &getDeltaLambdaStep(void) const
80  { return deltaLambdaStep; }
81  inline void setDeltaLambdaStep(const double &d)
82  { deltaLambdaStep= d; }
83 
84  inline const double &getCurrentLambda(void) const
85  { return currentLambda; }
86  inline double &getCurrentLambda(void)
87  { return currentLambda; }
88  inline void setCurrentLambda(const double &d)
89  { currentLambda= d; }
90 
91  void newStep(const double &);
92  void determineUhat(LinearSOE &);
93  void distribDetermineUhat(const int &,LinearSOE &);
94  void solve(const Vector &,LinearSOE &);
95  void update(const double &);
96  void domainChanged(const size_t &sz,IncrementalIntegrator &,LinearSOE &);
97 
98  int sendSelf(Communicator &);
99  int recvSelf(const Communicator &);
100  };
101 } // end of XC namespace
102 
103 #endif
104 
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
Linear system of equations.
Definition: LinearSOE.h:92
IntegratorVectors(void)
Constructor.
Definition: IntegratorVectors.cc:37
Object that can move between processes.
Definition: MovableObject.h:100
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: IntegratorVectors.cc:162
void update(const double &)
Updates vectors.
Definition: IntegratorVectors.cc:106
void resize(const int &size)
Changes vectors size.
Definition: IntegratorVectors.cc:42
void determineUhat(LinearSOE &)
Computes the solution for the new load vector.
Definition: IntegratorVectors.cc:88
void distribDetermineUhat(const int &, LinearSOE &)
Computes the solution for the new load vector using parallel processing.
Definition: IntegratorVectors.cc:73
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: IntegratorVectors.cc:150
Vectors used by many integrators.
Definition: IntegratorVectors.h:41
int sendSelf(Communicator &)
Send the object.
Definition: IntegratorVectors.cc:173
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:100
int recvSelf(const Communicator &)
Receive the object.
Definition: IntegratorVectors.cc:188
void newStep(const double &)
Performs a new step.
Definition: IntegratorVectors.cc:61
void domainChanged(const size_t &sz, IncrementalIntegrator &, LinearSOE &)
Response to a domain change.
Definition: IntegratorVectors.cc:119
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void solve(const Vector &, LinearSOE &)
Computes the solution for the new load vector.
Definition: IntegratorVectors.cc:99