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