xc
BandArpackSOE.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 // File: ~/system_of_eqn/eigenSOE/BandArpackSOE.h
29 //
30 // Written: Jun Peng
31 // Created: February 1999
32 // Revision: A
33 //
34 
35 
36 
37 #ifndef BandArpackSOE_h
38 #define BandArpackSOE_h
39 
40 #include <solution/system_of_eqn/eigenSOE/ArpackSOEBase.h>
41 #include "utility/matrix/Vector.h"
42 
43 namespace XC {
44 
45 class BandArpackSolver;
46 
48 //
53  {
54  private:
55  int numSuperD;
56  int numSubD;
57  Vector A;
58  protected:
59  bool setSolver(EigenSolver *);
60 
61  friend class SolutionStrategy;
62  friend class FEM_ObjectBroker;
63  BandArpackSOE(SolutionStrategy *, double shift = 0.0);
64  SystemOfEqn *getCopy(void) const;
65  public:
66  virtual int setSize(Graph &theGraph);
67 
68  virtual int addA(const Matrix &, const ID &, double fact = 1.0);
69  virtual int addM(const Matrix &, const ID &, double fact = 1.0);
70 
71  virtual void zeroA(void);
72 
73  int sendSelf(Communicator &);
74  int recvSelf(const Communicator &);
75 
76  virtual void save(void) const;
77  virtual void restore(void);
78 
79  friend class BandArpackSolver;
80  };
82  { return new BandArpackSOE(*this); }
83 } // end of XC namespace
84 
85 
86 #endif
87 
88 
89 
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
virtual int addM(const Matrix &, const ID &, double fact=1.0)
Assemblies in M the matrix being passed as parameter multiplied by the fact parameter.
Definition: BandArpackSOE.cpp:212
BandArpackSOE is a subclass of ArpackSOE.
Definition: BandArpackSOE.h:52
BandArpackSOE(SolutionStrategy *, double shift=0.0)
Constructor.
Definition: BandArpackSOE.cpp:46
Base class for Arpack++ based system of equations.
Definition: ArpackSOEBase.h:39
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:151
Vector of integers.
Definition: ID.h:95
Eigenvalue SOE solver.
Definition: EigenSolver.h:60
virtual void zeroA(void)
Zeroes the matrix M.
Definition: BandArpackSOE.cpp:204
bool setSolver(EigenSolver *)
Sets the solver that will be used to compute the solution.
Definition: BandArpackSOE.cpp:51
int sendSelf(Communicator &)
Send the object.
Definition: BandArpackSOE.cpp:257
int recvSelf(const Communicator &)
Receive the object.
Definition: BandArpackSOE.cpp:260
System of equations base class.
Definition: SystemOfEqn.h:90
The Graph class provides the abstraction of a graph.
Definition: Graph.h:94
virtual void restore(void)
Restore the SOE matrices and vectors from file.
Definition: BandArpackSOE.cpp:289
virtual int addA(const Matrix &, const ID &, double fact=1.0)
Assemblies in A the matrix being passed as parameter multiplied by the fact parameter.
Definition: BandArpackSOE.cpp:95
virtual int setSize(Graph &theGraph)
Sets the size of the system from the number of vertices in the graph.
Definition: BandArpackSOE.cpp:67
Solution strategy for the finite element problem.
Definition: SolutionStrategy.h:94
SystemOfEqn * getCopy(void) const
Virtual constructor.
Definition: BandArpackSOE.h:81
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Arpack solver for banded matrices.
Definition: BandArpackSolver.h:74
virtual void save(void) const
Save the SOE matrices and vectors to file.
Definition: BandArpackSOE.cpp:269