DistributedSparseGenRowLinSOE.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.1 $ 00022 // $Date: 2005/12/06 22:20:18 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenRowLinSOE.h,v $ 00024 00025 #ifndef DistributedSparseGenRowLinSOE_h 00026 #define DistributedSparseGenColLinSOE_h 00027 00028 // Written: fmk 00029 // Created: 04/05 00030 // Revision: A 00031 // 00032 // Description: This file contains the class definition for DistributedSparseGenColLinSOE 00033 // DistributedSparseGenColLinSOE is a subclass of LinearSOE. It stores the matrix equation 00034 // Ax=b using the sparse row-compacted storage scheme for storing the 00035 // matrix A. 00036 // 00037 // What: "@(#) DistributedSparseGenColLinSOE.h, revA" 00038 00039 #include <LinearSOE.h> 00040 #include <Vector.h> 00041 #include <ID.h> 00042 00043 class DistributedSparseGenRowLinSolver; 00044 00045 class DistributedSparseGenRowLinSOE : public LinearSOE 00046 { 00047 public: 00048 DistributedSparseGenRowLinSOE(DistributedSparseGenRowLinSolver &theSolver); 00049 ~DistributedSparseGenRowLinSOE(); 00050 00051 int getNumEqn(void) const; 00052 int setSize(Graph &theGraph); 00053 int addA(const Matrix &, const ID &, double fact = 1.0); 00054 int addB(const Vector &, const ID &, double fact = 1.0); 00055 int setB(const Vector &, double fact = 1.0); 00056 00057 void zeroA(void); 00058 void zeroB(void); 00059 00060 const Vector &getX(void); 00061 const Vector &getB(void); 00062 double normRHS(void); 00063 00064 void setX(int loc, double value); 00065 void setX(const Vector &x); 00066 int setDistributedSparseGenRowSolver(DistributedSparseGenRowLinSolver &newSolver); 00067 00068 int sendSelf(int commitTag, Channel &theChannel); 00069 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker); 00070 friend class DistributedSuperLU; 00071 00072 int setProcessID(int processTag); 00073 int setChannels(int numChannels, Channel **theChannels); 00074 00075 protected: 00076 00077 private: 00078 int processID; 00079 int numChannels; 00080 Channel **theChannels; 00081 ID **localCol; 00082 00083 int n; // order of A 00084 int nnz; // number of non-zeros in A 00085 double *A, *B, *X; // 1d arrays containing coefficients of A, B and X 00086 int *colA, *rowStartA; // int arrays containing info about coeficientss in A 00087 Vector *vectX; 00088 Vector *vectB; 00089 int Asize, Bsize; // size of the 1d array holding A 00090 bool factored; 00091 00092 int numP; // numProcesses involved in computation 00093 int rank; // rank of current process 00094 int startRow; // start row number of rows assigned to current process 00095 int endRow; // end row number of rows assigned to current 00096 int numRows; // number of rows asigned to Process, 00097 // first rows will be startRow through endRow; after that 00098 // come all rows not yet accounted for in rows that are in graph passed in setGraph 00099 ID rows; // the rows of A 00100 ID **otherProcessesRows; // the rows & row location of data that will be sent by the processes for rows 00101 // not assigned to them yet for which they have data. 00102 ID **otherProcessesRowStart; 00103 int remoteDataLoc; 00104 }; 00105 00106 00107 #endif 00108 |