PetscSolver.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/01/13 00:02:03 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/petsc/PetscSolver.h,v $
00024                                                                         
00025                                                                         
00026 // Written: fmk 
00027 // Created: Tue Sep 26 16:27:47: 1996
00028 // Revision: A
00029 //
00030 // Description: This file contains the class definition for 
00031 // PetscSolver. It solves the FullGenLinSOE object by calling
00032 // Lapack routines.
00033 //
00034 // What: "@(#) PetscSolver.h, revA"
00035 
00036 #ifndef PetscSolver_h
00037 #define PetscSolver_h
00038 
00039 #include <petscksp.h>
00040 #include <LinearSOESolver.h>
00041 
00042 class PetscSOE;
00043 
00044 class PetscSolver : public LinearSOESolver
00045 {
00046   public:
00047     PetscSolver();    
00048     PetscSolver(KSPType method, PCType preconditioner);    
00049     PetscSolver(KSPType method, PCType preconditioner, double rTol, double aTol, double dTol, int maxIts);    
00050     ~PetscSolver();
00051 
00052     int solve(void);
00053     int setSize(void);
00054     virtual int setLinearSOE(PetscSOE &theSOE);
00055     
00056     int sendSelf(int commitTag, Channel &theChannel);
00057     int recvSelf(int commitTag, Channel &theChannel, 
00058                  FEM_ObjectBroker &theBroker);    
00059 
00060     friend class ActorPetscSOE;
00061     friend class ShadowPetscSOE;
00062     
00063   protected:
00064     PetscSOE *theSOE;
00065 
00066   private:
00067     KSP ksp;                   
00068     PC pc;
00069     int its;
00070     KSPType method;
00071     PCType preconditioner;
00072     double rTol;
00073     double aTol;
00074     double dTol; 
00075     int maxIts;
00076 
00077     static int numSolver;
00078 };
00079 
00080 #endif
00081 

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