XC Open source finite element analysis program
BandArpackSolver.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 // File: ~/system_of_eqn/eigenSOE/BandArpackSolver.h
28 //
29 // Written: Jun Peng
30 // Created: Feb. 11, 1999
31 // Revision: A
32 //
33 // Description: This file contains the class definition for
34 // BandArpackSolver. It solves the BandArpackSOE object by calling
35 // Arpack routines.
36 
37 
38 #ifndef BandArpackSolver_h
39 #define BandArpackSolver_h
40 
41 #include <solution/system_of_eqn/eigenSOE/EigenSolver.h>
42 #include <solution/system_of_eqn/eigenSOE/BandArpackSOE.h>
43 
44 namespace XC {
46 //
51  {
52  private:
53  BandArpackSOE *theSOE;
54  Vector value;
55  Vector eigenvector;
56  double tol;
57  int maxitr;
58  ID iPiv;
59  mutable Vector eigenV;
60 
61  void myMv(int n, double *v, double *result);
62  void myCopy(int n, double *v, double *result);
63  int getNCV(int n, int nev);
64 
65  void print_err_info(int);
66  protected:
67 
68 
69  friend class EigenSOE;
70  BandArpackSolver(int numE = 0);
71  virtual EigenSolver *getCopy(void) const;
72  bool setEigenSOE(EigenSOE *theSOE);
73  public:
74 
75  virtual int solve(void);
76  virtual int solve(int nModes);
77  virtual int setSize(void);
78  const int &getSize(void) const;
79  virtual bool setEigenSOE(BandArpackSOE &theSOE);
80 
81  virtual const Vector &getEigenvector(int mode) const;
82  virtual const double &getEigenvalue(int mode) const;
83 
84  int sendSelf(CommParameters &);
85  int recvSelf(const CommParameters &);
86  };
87 
88 inline EigenSolver *BandArpackSolver::getCopy(void) const
89  { return new BandArpackSolver(*this); }
90 } // end of XC namespace
91 
92 #endif
93 
94 
BandArpackSolver(int numE=0)
Constructor.
Definition: BandArpackSolver.cpp:51
virtual int setSize(void)
Sets the system size.
Definition: BandArpackSolver.cpp:449
Definition: Vector.h:82
Base class for eigenproblem systems of equations.
Definition: EigenSOE.h:63
const int & getSize(void) const
Returns the eigenvectors dimension.
Definition: BandArpackSolver.cpp:462
virtual const double & getEigenvalue(int mode) const
Returns the autovalor correspondiente al modo being passed as parameter.
Definition: BandArpackSolver.cpp:430
bool setEigenSOE(EigenSOE *theSOE)
Sets the eigenproblem to solve.
Definition: BandArpackSolver.cpp:383
Definition: ID.h:77
virtual const Vector & getEigenvector(int mode) const
Returns the autovector correspondiente al modo being passed as parameter.
Definition: BandArpackSolver.cpp:403
Arpack solver for banded matrices. The ARnoldi PACKage, is a numerical software library written in FO...
Definition: BandArpackSolver.h:50
virtual int solve(void)
Solves the eigenproblem.
Definition: BandArpackSolver.cpp:133
BandArpackSOE is a subclass of ArpackSOE. It uses the LAPACK storage scheme to store the components o...
Definition: BandArpackSOE.h:51
Communication parameters between processes.
Definition: CommParameters.h:65
Eigenvalue SOE solver.
Definition: EigenSolver.h:59
================================================================================
Definition: ContinuaReprComponent.h:34