MumpsSOE.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.3 $
00022 // $Date: 2006/04/04 22:59:50 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/mumps/MumpsSOE.h,v $
00024                                                                         
00025 #ifndef MumpsSOE_h
00026 #define MumpsSOE_h
00027 
00028 // Written: fmk 
00029 // Created: 02/06
00030 //
00031 // Description: This file contains the class definition for MumpsSOE
00032 // MumpsSOE is a subclass of LinearSOE. It stores the matrix equation
00033 // Ax=b using the sparse column-compacted storage scheme for storing the 
00034 // matrix A. 
00035 //
00036 // matrix types (matType): 0 Unsymmetrc
00037 //                         1 Symmetrix positive definite
00038 //                         2 General Symmetric
00039 //
00040 // What: "@(#) MumpsSOE.h, revA"
00041 
00042 #include <LinearSOE.h>
00043 #include <Vector.h>
00044 
00045 class MumpsSolver;
00046 class LinearSOESolver;
00047 
00048 class MumpsSOE : public LinearSOE
00049 {
00050   public:
00051   MumpsSOE(MumpsSolver &theSolver, int matType=2);        
00052   MumpsSOE(LinearSOESolver &theSolver, int classTag, int matType = 2);        
00053 
00054     virtual ~MumpsSOE();
00055 
00056     virtual int getNumEqn(void) const;
00057     virtual int setSize(Graph &theGraph);
00058     virtual int addA(const Matrix &, const ID &, double fact = 1.0);
00059     virtual int addB(const Vector &, const ID &, double fact = 1.0);    
00060     virtual int setB(const Vector &, double fact = 1.0);        
00061     
00062     virtual void zeroA(void);
00063     virtual void zeroB(void);
00064     
00065     virtual const Vector &getX(void);
00066     virtual const Vector &getB(void);    
00067     virtual double normRHS(void);
00068 
00069     virtual void setX(int loc, double value);        
00070     virtual void setX(const Vector &x);        
00071     virtual int setMumpsSolver(MumpsSolver &newSolver);    
00072 
00073     virtual int sendSelf(int commitTag, Channel &theChannel);
00074     virtual int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00075 
00076     friend class MumpsSolver;    
00077 
00078 
00079   protected:
00080     int size;            // order of A
00081     int nnz;             // number of non-zeros in A
00082     double *A, *B, *X;   // 1d arrays containing coefficients of A, B and X
00083     int *colA, *rowA, *rowB, *colStartA; // int arrays containing info about coeficientss in A
00084     Vector *vectX;
00085     Vector *vectB;    
00086     int Asize, Bsize;    // size of the 1d array holding A
00087     bool factored;
00088     int matType;
00089 
00090   private:
00091 
00092 };
00093 
00094 
00095 #endif
00096 

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