XC Open source finite element analysis program
ItpackLinSolver.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 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.2 $
48 // $Date: 2002/06/08 16:17:26 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/itpack/ItpackLinSolver.h,v $
50 
51 #ifndef ItpackLinSolver_h
52 #define ItpackLinSolver_h
53 
54 // Written: MHS
55 // Created: Sept 2001
56 //
57 // Description: This file contains the class definition for ItpackLinSolver.
58 // ItpackLinSolver is a concrete subclass of LinearSOE. It stores full
59 // unsymmetric linear system of equations using 1d arrays in Fortan style
60 
61 #include <solution/system_of_eqn/linearSOE/LinearSOESolver.h>
62 
63 // Adaptive methods
64 #define ItpackJCG 1
65 #define ItpackJSI 2
66 #define ItpackSOR 3
67 #define ItpackSSORCG 4
68 #define ItpackSSORSI 5
69 #define ItpackRSCG 6
70 #define ItpackRSSI 7
71 
72 // Textbook methods
73 #define ItpackJ 8
74 #define ItpackGS 9
75 #define ItpackSORFixed 10
76 #define ItpackSSORFixed 11
77 #define ItpackRS 12
78 
79 namespace XC {
80 class ItpackLinSOE;
81 
83 //
86  {
87  private:
88 
89  ItpackLinSOE *theSOE;
90 
91  ID IA;
92  ID JA;
93 
94  int n; // Size of system, i.e., the number of equations
95  // Parameter arrays sent to ITPACK subroutines
96  int iparm[12];
97  double rparm[12];
98  // Workspace arrays sent to ITPACK subroutines
99  ID iwksp;
100  Vector wksp;
101 
102  int nwksp;
103  int maxIter;
104  int method;
105  double omega;
106 
107  ItpackLinSolver(int method, int maxIter = 100, double omega = 1.0);
108  ItpackLinSolver(void);
109  virtual LinearSOESolver *getCopy(void) const;
110  virtual bool setLinearSOE(LinearSOE *theSOE);
111  public:
112 
113  int solve(void);
114  int setSize(void);
115  bool setLinearSOE(ItpackLinSOE &theSOE);
116 
117  int sendSelf(CommParameters &);
118  int recvSelf(const CommParameters &);
119  };
120 
121 inline LinearSOESolver *ItpackLinSolver::getCopy(void) const
122  { return new ItpackLinSolver(*this); }
123 } // end of XC namespace
124 
125 #endif
Solution of the linear system of equations.
Definition: LinearSOESolver.h:82
Definition: Vector.h:82
Definition: ID.h:77
ITPACK based systems of equations.
Definition: ItpackLinSOE.h:77
ITPACK based linear SOE solver.
Definition: ItpackLinSolver.h:85
Linea system of equations. This is the class definition for LinearSOE. LinearSOE is an abstract base ...
Definition: LinearSOE.h:86
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34