XC Open source finite element analysis program
LinearSOE.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.4 $
48 // $Date: 2005/12/01 01:12:55 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/LinearSOE.h,v $
50 
51 
52 #ifndef LinearSOE_h
53 #define LinearSOE_h
54 
55 // File: ~/system_of_eqn/LinearSOE.h
56 //
57 // Written: fmk
58 // Created: 11/96
59 // Revision: A
60 //
61 //
62 // What: "@(#) LinearSOE.h, revA"
63 
64 #include <solution/system_of_eqn/SystemOfEqn.h>
65 
66 namespace XC {
67 class LinearSOESolver;
68 class Matrix;
69 class Vector;
70 class ID;
71 
75 //
77 //
86 class LinearSOE : public SystemOfEqn
87  {
88  private:
89  LinearSOESolver *theSolver;
90  protected:
91  void libera(void);
92  void copia(const LinearSOESolver *);
93  friend class FEM_ObjectBroker;
94  virtual bool setSolver(LinearSOESolver *);
95  int setSolverSize(void);
96 
97  LinearSOE(SoluMethod *,int classTag);
98  public:
99  virtual ~LinearSOE(void);
100 
101  virtual int solve(void);
102 
103  virtual int setSize(Graph &theGraph) =0;
104  virtual int getNumEqn(void) const =0;
105 
106  virtual int addA(const Matrix &, const ID &, double fact = 1.0) =0;
107  virtual int addB(const Vector &, const ID &,const double &fact= 1.0) =0;
108  virtual int setB(const Vector &, const double &fact= 1.0) =0;
109 
110  virtual void zeroA(void) =0;
111  virtual void zeroB(void) =0;
112 
113  virtual const Vector &getX(void) const= 0;
114  virtual const Vector &getB(void) const= 0;
115  virtual double getDeterminant(void);
116  virtual double normRHS(void) const= 0;
117 
118  virtual void setX(int loc, double value) =0;
119  virtual void setX(const Vector &X) =0;
120 
121  LinearSOESolver *getSolver(void);
122  LinearSOESolver &newSolver(const std::string &);
123  };
124 } // end of XC namespace
125 
126 
127 #endif
LinearSOESolver * getSolver(void)
Returns a pointer to the solver.
Definition: LinearSOE.cpp:206
LinearSOE(SoluMethod *, int classTag)
Constructor.
Definition: LinearSOE.cpp:104
Solution of the linear system of equations.
Definition: LinearSOESolver.h:82
Definition: Vector.h:82
Solution procedure for the finite element problem. The solution procedure is definde by specifiying: ...
Definition: SoluMethod.h:76
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
virtual ~LinearSOE(void)
Destructor.
Definition: LinearSOE.cpp:193
System of equations base class.
Definition: SystemOfEqn.h:84
Definition: ID.h:77
Definition: Matrix.h:82
virtual int solve(void)
Resuelve el system of equations.
Definition: LinearSOE.cpp:197
Linea system of equations. This is the class definition for LinearSOE. LinearSOE is an abstract base ...
Definition: LinearSOE.h:86
The Graph class provides the abstraction of a graph, a collection of vertices and edges...
Definition: Graph.h:84
virtual double getDeterminant(void)
Returns the determinante de la matriz del sistema.
Definition: LinearSOE.cpp:201
virtual bool setSolver(LinearSOESolver *)
Sets the solver al system of equations.
Definition: LinearSOE.cpp:130
================================================================================
Definition: ContinuaReprComponent.h:34
int setSolverSize(void)
invoke setSize() on the Solver
Definition: LinearSOE.cpp:210