XC Open source finite element analysis program
SymArpackSOE.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/linearSOE/LawSolver/SymArpackSOE.h
28 //
29 // Written: Jun Peng
30 // Created: 12/98
31 // Revision: A
32 //
33 // Description: This file contains the class definition for
34 // SymArpackSOE.h. It stores the sparse matrix A in a fashion
35 // that only store the none zero.
36 //
37 // What: "@(#) SymArpackSOE.h, revA"
38 //
39 // Almost all the information (Matrix A and Vector B) is stored as
40 // global variables in the file "symbolic.h".
41 
42 
43 #ifndef SymArpackSOE_h
44 #define SymArpackSOE_h
45 
46 #include <solution/system_of_eqn/eigenSOE/ArpackSOE.h>
47 
48 extern "C" {
49  #include <solution/system_of_eqn/linearSOE/sparseSYM/FeStructs.h>
50 }
51 
52 
53 
54 namespace XC {
55 class SymArpackSolver;
56 
58 //
60 class SymArpackSOE : public ArpackSOE
61  {
62  private:
63  int nnz; // number of non-zeros in A
64  ID colA;
65  ID rowStartA; //These are (ADJNCY, XADJ) pair.
66 
67  int nblks;
68  int *xblk, *invp;
69  double *diag, **penv;
70  int *rowblks;
71  OFFDBLK **begblk;
72  OFFDBLK *first;
73  protected:
74  bool setSolver(EigenSolver *);
75 
76 
77  friend class SoluMethod;
78  friend class FEM_ObjectBroker;
79  SymArpackSOE(SoluMethod *,double shift = 0.0);
80  SystemOfEqn *getCopy(void) const;
81  public:
82  virtual ~SymArpackSOE(void);
83 
84  virtual int setSize(Graph &theGraph);
85 
86  virtual int addA(const Matrix &, const ID &, double fact = 1.0);
87  virtual int addM(const Matrix &, const ID &, double fact = 1.0);
88 
89  virtual void zeroA(void);
90  virtual void zeroM(void);
91  virtual void identityM(void);
92 
93  int sendSelf(CommParameters &);
94  int recvSelf(const CommParameters &);
95 
96  friend class SymArpackSolver;
97  };
98 inline SystemOfEqn *SymArpackSOE::getCopy(void) const
99  { return new SymArpackSOE(*this); }
100 } // end of XC namespace
101 
102 #endif
103 
Arpack system of equations for symmetric matrices.
Definition: SymArpackSOE.h:60
virtual void identityM(void)
Makes M the identity matrix (to find stiffness matrix eigenvalues).
Definition: SymArpackSOE.cpp:332
Definition: FeStructs.h:45
virtual int addA(const Matrix &, const ID &, double fact=1.0)
Assemblies into A the matrix being passed as parameter multiplied by the fact parameter.
Definition: SymArpackSOE.cpp:182
Arpack based symmetric matrix eigenvalue SOE solver.
Definition: SymArpackSolver.h:52
Solution procedure for the finite element problem. The solution procedure is definde by specifiying: ...
Definition: SoluMethod.h:76
Arpack++ based system of equations.
Definition: ArpackSOE.h:39
virtual ~SymArpackSOE(void)
Destructor.
Definition: SymArpackSOE.cpp:71
virtual int addM(const Matrix &, const ID &, double fact=1.0)
Assemblies into M the matrix being passed as parameter multiplied by the fact parameter.
Definition: SymArpackSOE.cpp:301
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
virtual void zeroA(void)
Anula la matriz A.
Definition: SymArpackSOE.cpp:322
System of equations base class.
Definition: SystemOfEqn.h:84
Definition: ID.h:77
bool setSolver(EigenSolver *)
Sets the solver that will be used to solve the eigenproblem.
Definition: SymArpackSOE.cpp:56
Definition: Matrix.h:82
virtual void zeroM(void)
Anula la matriz M.
Definition: SymArpackSOE.cpp:326
The Graph class provides the abstraction of a graph, a collection of vertices and edges...
Definition: Graph.h:84
virtual int setSize(Graph &theGraph)
Sets the size of the system from the number of vertices in the graph.
Definition: SymArpackSOE.cpp:92
Communication parameters between processes.
Definition: CommParameters.h:65
Eigenvalue SOE solver.
Definition: EigenSolver.h:59
================================================================================
Definition: ContinuaReprComponent.h:34
SymArpackSOE(SoluMethod *, double shift=0.0)
Constructor.
Definition: SymArpackSOE.cpp:49