Epetra_LinearProblemRedistor.h

Go to the documentation of this file.
00001 
00002 //@HEADER
00003 /*
00004 ************************************************************************
00005 
00006               Epetra: Linear Algebra Services Package 
00007                 Copyright (2001) Sandia Corporation
00008 
00009 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 license for use of this work by or on behalf of the U.S. Government.
00011 
00012 This library is free software; you can redistribute it and/or modify
00013 it under the terms of the GNU Lesser General Public License as
00014 published by the Free Software Foundation; either version 2.1 of the
00015 License, or (at your option) any later version.
00016  
00017 This library is distributed in the hope that it will be useful, but
00018 WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 Lesser General Public License for more details.
00021  
00022 You should have received a copy of the GNU Lesser General Public
00023 License along with this library; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025 USA
00026 Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00027 
00028 ************************************************************************
00029 */
00030 //@HEADER
00031 
00032 #ifndef EPETRA_LINEARPROBLEMREDISTOR_H
00033 #define EPETRA_LINEARPROBLEMREDISTOR_H
00034 
00035 class Epetra_Map; 
00036 class Epetra_Export;
00037 class Epetra_LinearProblem;
00038 class Epetra_RowMatrixTransposer;
00039 
00041 
00054 class Epetra_LinearProblemRedistor {
00055     
00056   public:
00057 
00059 
00060 
00061 
00069   Epetra_LinearProblemRedistor(Epetra_LinearProblem * OrigProblem, const Epetra_Map & RedistMap);
00070 
00072 
00083   Epetra_LinearProblemRedistor(Epetra_LinearProblem * OrigProblem, int NumProc, bool Replicate);
00084 
00086   
00087   Epetra_LinearProblemRedistor(const Epetra_LinearProblemRedistor& Source);
00088   
00090   
00091   virtual ~Epetra_LinearProblemRedistor();
00093   
00095 
00096   
00098 
00128   int CreateRedistProblem(const bool ConstructTranspose, const bool MakeDataContiguous, 
00129                           Epetra_LinearProblem *& RedistProblem);
00130 
00131   
00133 
00145   int UpdateRedistProblemValues(Epetra_LinearProblem * ProblemWithNewValues);
00146 
00148 
00159   int UpdateRedistRHS(Epetra_MultiVector * RHSWithNewValues);
00161   
00163 
00164 
00165 
00175   int UpdateOriginalLHS(Epetra_MultiVector * LHS);
00177   
00179 
00180 
00181 
00185   const Epetra_Map & RedistMap() const {return(*RedistMap_);};
00186   
00188 
00192   const Epetra_Export & RedistExporter()  const {return(*RedistExporter_);};
00194   
00196 
00197 
00199 
00203   int ExtractHbData(int & M, int & N, int & nz, int * & ptr, int * & ind, 
00204                     double * & val, int & Nrhs, double * & rhs, int & ldrhs, 
00205                                                 double * & lhs, int & ldlhs) const;
00207   
00209 
00210   
00212   virtual void Print(ostream & os) const;
00214   
00215  private: 
00216   int GenerateRedistMap();
00217 
00218   Epetra_LinearProblem * OrigProblem_;
00219   int NumProc_;
00220   Epetra_LinearProblem * RedistProblem_;
00221   Epetra_Map * RedistMap_;
00222   Epetra_RowMatrixTransposer * Transposer_;
00223   Epetra_Export * RedistExporter_;
00224 
00225   bool Replicate_;
00226   bool ConstructTranspose_;
00227   bool MakeDataContiguous_;
00228   bool MapGenerated_;
00229   bool RedistProblemCreated_;
00230 
00231   mutable int * ptr_;
00232     
00233 
00234 };
00235 
00236 #endif /* EPETRA_LINEARPROBLEMREDISTOR_H */

Generated on Thu Sep 18 12:37:57 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1