xc
BandArpackppSolver.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 //BandArpackppSolver.h
29 
30 #ifndef BandArpackppSolver_h
31 #define BandArpackppSolver_h
32 
33 #include <solution/system_of_eqn/eigenSOE/EigenSolver.h>
34 #include "utility/matrix/Vector.h"
35 
36 namespace XC {
37 class BandArpackppSOE;
38 
42  {
43  private:
44  BandArpackppSOE *theSOE;
45  std::vector<double> eigenvalues;
46  std::vector<Vector> eigenvectors;
47 
48  void setup_autos(const size_t &nmodos,const size_t &n);
49 
50  friend class EigenSOE;
51  BandArpackppSolver(void);
52  BandArpackppSolver(const int &nModes);
53  virtual EigenSolver *getCopy(void) const;
54  bool setEigenSOE(EigenSOE *theSOE);
55  public:
56 
57  virtual int solve(void);
58  virtual int setSize(void);
59  const int &getSize(void) const;
60  virtual bool setEigenSOE(BandArpackppSOE &theSOE);
61 
62  virtual const Vector &getEigenvector(int mode) const;
63  virtual const double &getEigenvalue(int mode) const;
64 
65  int sendSelf(Communicator &);
66  int recvSelf(const Communicator &);
67  };
68 
69 inline EigenSolver *BandArpackppSolver::getCopy(void) const
70  { return new BandArpackppSolver(*this); }
71 } // end of XC namespace
72 
73 #endif
Float vector abstraction.
Definition: Vector.h:94
Arpack++ based band matrix eigenvalue SOE solver.
Definition: BandArpackppSOE.h:44
int sendSelf(Communicator &)
Send the object.
Definition: BandArpackppSolver.cc:195
const int & getSize(void) const
Return the dimension of eigenvectors.
Definition: BandArpackppSolver.cc:192
Base class for eigenproblem systems of equations.
Definition: EigenSOE.h:64
Communication parameters between processes.
Definition: Communicator.h:66
virtual int solve(void)
Compute eigenvalues.
Definition: BandArpackppSolver.cc:77
Eigenvalue SOE solver.
Definition: EigenSolver.h:60
int recvSelf(const Communicator &)
Receive the object.
Definition: BandArpackppSolver.cc:198
Arpack++ based band matrix eigenproblem solver.
Definition: BandArpackppSolver.h:41
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35