DistributedDiagonalSOE.h

Go 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/05/25 23:33:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/diagonal/DistributedDiagonalSOE.h,v $
00024                                                                         
00025 // Written: fmk 
00026 // Created: 05/05
00027 //
00028 // Description: This file contains the class definition for DistributedDiagonalSOE
00029 // DistributedDiagonalSOE is a subclass of LinearSOE. It stores a diagonal system
00030 // of equation, i.e. just the diagonal
00031 
00032 // What: "@(#) DistributedDiagonalSOE.h, revA"
00033 
00034 #ifndef DistributedDiagonalSOE_h
00035 #define DistributedDiagonalSOE_h
00036 
00037 #include <LinearSOE.h>
00038 #include <Vector.h>
00039 #include <ID.h>
00040 
00041 class DistributedDiagonalSolver;
00042 
00043 class DistributedDiagonalSOE : public LinearSOE
00044 {
00045   public:
00046     DistributedDiagonalSOE(DistributedDiagonalSolver &theSolver);
00047     ~DistributedDiagonalSOE();
00048 
00049     int getNumEqn(void) const;
00050     int setSize(Graph &theGraph);
00051     int addA(const Matrix &, const ID &, double fact = 1.0);
00052     int addB(const Vector &, const ID &, double fact = 1.0);    
00053     int setB(const Vector &, double fact = 1.0);        
00054     
00055     void zeroA(void);
00056     void zeroB(void);
00057 
00058     void setX(int loc, double value);
00059     void setX(const Vector &x);
00060     
00061     const Vector &getX(void);
00062     const Vector &getB(void);
00063     double normRHS(void);
00064 
00065     int setDiagonalSolver(DistributedDiagonalSolver &newSolver);    
00066     
00067     int sendSelf(int commitTag, Channel &theChannel);
00068     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00069     int setChannels(int nChannels, Channel **theC);
00070 
00071     int setAnalysisModel(AnalysisModel &theModel);
00072 
00073     friend class DistributedDiagonalSolver;
00074     
00075   protected:
00076     
00077   private:
00078     int size;
00079     double *A, *B, *X;
00080     Vector *vectX;
00081     Vector *vectB;
00082     bool isAfactored;
00083 
00084     int processID;
00085     int numProcesses;
00086     int numChannels;
00087     Channel **theChannels;
00088     ID **localCol;
00089 
00090     ID myDOFs;
00091     ID myDOFsShared;
00092     int numShared;
00093     double *dataShared;
00094     Vector *vectShared;
00095     AnalysisModel *theModel;
00096 };
00097 
00098 
00099 #endif
00100 
00101 
00102 

Generated on Mon Oct 23 15:05:28 2006 for OpenSees by doxygen 1.5.0