XC Open source finite element analysis program
DistributedSparseGenRowLinSOE.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.1 $
48 // $Date: 2005/12/06 22:20:18 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenRowLinSOE.h,v $
50 
51 #ifndef DistributedSparseGenRowLinSOE_h
52 #define DistributedSparseGenRowLinSOE_h
53 
54 // Written: fmk
55 // Created: 04/05
56 // Revision: A
57 //
58 // Description: This file contains the class definition for DistributedSparseGenColLinSOE
59 // DistributedSparseGenColLinSOE is a subclass of LinearSOE. It stores the matrix equation
60 // Ax=b using the sparse row-compacted storage scheme for storing the
61 // matrix A.
62 //
63 // What: "@(#) DistributedSparseGenColLinSOE.h, revA"
64 
65 #include <solution/system_of_eqn/linearSOE/sparseGEN/SparseGenSOEBase.h>
66 #include "solution/system_of_eqn/linearSOE/DistributedLinSOE.h"
67 #include <utility/matrix/ID.h>
68 
69 namespace XC {
70 class DistributedSparseGenRowLinSolver;
71 
73 //
76  {
77  private:
78  ID colA;
79  ID rowStartA;
80 
81  int numP;
82  int rank;
83  int startRow;
84  int endRow;
85  int numRows;
86  // first rows will be startRow through endRow; after that
87  // come all rows not yet accounted for in rows that are in graph passed in setGraph
88  ID rows;
89  std::vector<ID *> otherProcessesRows;
90  // that will be sent by the processes
91  // for rows not assigned to
92  // them yet for which they have data.
93  std::vector<ID *> otherProcessesRowStart;
94  int remoteDataLoc;
95  protected:
96  virtual bool setSolver(LinearSOESolver *);
97 
98  friend class SoluMethod;
100  SystemOfEqn *getCopy(void) const;
101  public:
102  int setSize(Graph &theGraph);
103  int addA(const Matrix &, const ID &, double fact = 1.0);
104  int addB(const Vector &, const ID &, double fact = 1.0);
105 
106  int sendSelf(CommParameters &);
107  int recvSelf(const CommParameters &);
108  friend class DistributedSuperLU;
109  };
110 inline SystemOfEqn *DistributedSparseGenRowLinSOE::getCopy(void) const
111  { return new DistributedSparseGenRowLinSOE(*this); }
112 } // end of XC namespace
113 
114 
115 #endif
116 
Base class for distributed systems of equations.
Definition: DistributedLinSOE.h:46
SuperLU based solver for distributed sparse matrix linear systems of equations. It uses Gaussian elim...
Definition: DistributedSuperLU.h:82
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
Sparse nonsymmetric matrix distributed systems of equations.
Definition: DistributedSparseGenRowLinSOE.h:75
System of equations base class.
Definition: SystemOfEqn.h:84
Definition: ID.h:77
virtual bool setSolver(LinearSOESolver *)
Sets the solver al system of equations.
Definition: DistributedSparseGenRowLinSOE.cpp:75
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
Sparse unsymmetric matris system of equations.
Definition: SparseGenSOEBase.h:41