fei_BlockLinearProblemManager.hpp

00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2006 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _fei_BlockLinearProblemManager_hpp_
00010 #define _fei_BlockLinearProblemManager_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_SharedPtr.hpp>
00014 #include <fei_mpi.h>
00015 
00016 namespace fei {
00017   class ParameterSet;
00018   class SparseRowGraph;
00019 
00027   class BlockLinearProblemManager {
00028    public:
00030 
00032     virtual ~BlockLinearProblemManager(){}
00033 
00035 
00036 
00052     virtual void setRowDistribution(const std::vector<int>& ownedIDs,
00053                                     const std::vector<int>& dofPerOwnedID,
00054                                     const std::vector<int>& ghostIDs,
00055                                     const std::vector<int>& dofPerGhostID)=0;
00056 
00060     virtual void setMatrixGraph(fei::SharedPtr<fei::SparseRowGraph> matrixGraph)=0;
00061 
00063 
00064 
00067     virtual void setMatrixValues(double scalar)=0;
00068 
00071     virtual int getNumOwnedIDs()=0;
00072 
00078     virtual int getRowPointLength(int ownedID)=0;
00079 
00083     virtual int getRowBlockLength(int ownedID)=0;
00084 
00110     virtual int copyOutMatrixRow(int ownedID, int dofOffset,
00111                                  int numColIDs, int numCoefs,
00112                                  int* colIDs,
00113                                  int* dofPerColID,
00114                                  double* coefs);
00115 
00123     virtual int insertMatrixValues(int rowID, int numRowDof,
00124                                    int colID, int numColDof,
00125                                    const double* const* values,
00126                                    bool sum_into)=0;
00127 
00133     virtual int insertMatrixValues(int rowID, int rowDofOffset,
00134                                    int colID, int colDofOffset,
00135                                    double value,
00136                                    bool sum_into)=0;
00137 
00139 
00140 
00148     virtual void setVectorValues(double scalar, bool soln_vector)=0;
00149 
00174     virtual int insertVectorValues(int ID,
00175                                    int numDof,
00176                                    const double* values,
00177                                    bool sum_into,
00178                                    bool soln_vector,
00179                                    int vectorIndex=0)=0;
00180 
00184     virtual int copyOutVectorValues(int ID,
00185                                     int numDof,
00186                                     double* values,
00187                                     bool soln_vector,
00188                                     int vectorIndex=0) = 0;
00189 
00195     virtual double* getLocalVectorValuesPtr(bool soln_vector,
00196                                             int vectorIndex=0) = 0;
00198 
00199 
00205     virtual int globalAssemble() = 0;
00207 
00208 
00218     virtual int solve(const fei::ParameterSet& parameters) = 0;
00219 
00221   };//class BlockLinearProblemManager
00222 
00223 }//namespace fei
00224 
00225 #endif // _fei_BlockLinearProblemManager_hpp_
00226 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:23 2011 for FEI by  doxygen 1.6.3