XC Open source finite element analysis program
SymSparseLinSOE.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/SymSparseLinSOE.h
28 //
29 // Written: Jun Peng (junpeng@stanford.edu)
30 // Prof. Kincho H. Law
31 // Stanford University
32 // Created: 12/98
33 // Revision: A
34 //
35 // Description: This file contains the class definition for
36 // SymSparseLinSOE.h. It stores the sparse matrix A in a fashion
37 // that only store the non zero entries.
38 //
39 // What: "@(#) SymSparseLinSOE.h, revA"
40 //
41 // Almost all the information (Matrix A and Vector B) is stored as
42 // global variables in the file "symbolic.h".
43 
44 
45 #ifndef SymSparseLinSOE_h
46 #define SymSparseLinSOE_h
47 
48 #include <solution/system_of_eqn/linearSOE/SparseSOEBase.h>
49 
50 extern "C" {
51  #include <solution/system_of_eqn/linearSOE/sparseSYM/FeStructs.h>
52 }
53 
54 namespace XC {
55 class SymSparseLinSolver;
56 
58 //
61  {
62  private:
63  ID colA, rowStartA; //These are (ADJNCY, XADJ) pair.
64 
65  int LSPARSE;
66  int nblks;
67  int *xblk, *invp;
68  double *diag, **penv;
69  int *rowblks;
70  OFFDBLK **begblk;
71  OFFDBLK *first;
72  protected:
73  virtual bool setSolver(LinearSOESolver *);
74 
75  friend class SoluMethod;
76  SymSparseLinSOE(SoluMethod *,int lSparse= 0);
77  SystemOfEqn *getCopy(void) const;
78  public:
79  ~SymSparseLinSOE(void);
80 
81  int setSize(Graph &theGraph);
82  int addA(const Matrix &, const ID &, double fact = 1.0);
83  int addB(const Vector &, const ID &,const double &fact= 1.0);
84 
85  void zeroA(void);
86 
87  int setSymSparseLinSolver(SymSparseLinSolver *);
88 
89  int sendSelf(CommParameters &);
90  int recvSelf(const CommParameters &);
91 
92  friend class SymSparseLinSolver;
93  };
94 inline SystemOfEqn *SymSparseLinSOE::getCopy(void) const
95  { return new SymSparseLinSOE(*this); }
96 } // end of XC namespace
97 
98 #endif
99 
Base class for sparse matrix systems of equations.
Definition: SparseSOEBase.h:40
Solver for symmetric sparse linear SOE.
Definition: SymSparseLinSolver.h:55
Definition: FeStructs.h:45
Solution of the linear system of equations.
Definition: LinearSOESolver.h:82
Definition: Vector.h:82
virtual bool setSolver(LinearSOESolver *)
Sets the solver al system of equations.
Definition: SymSparseLinSOE.cpp:66
Solution procedure for the finite element problem. The solution procedure is definde by specifiying: ...
Definition: SoluMethod.h:76
System of equations base class.
Definition: SystemOfEqn.h:84
Definition: ID.h:77
Sparse symmetric matrix systems of equations.
Definition: SymSparseLinSOE.h:60
Definition: Matrix.h:82
The Graph class provides the abstraction of a graph, a collection of vertices and edges...
Definition: Graph.h:84
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34