Epetra_FEVector.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_FEVECTOR_H
00033 #define EPETRA_FEVECTOR_H
00034 
00035 #include <Epetra_CombineMode.h>
00036 #include <Epetra_Map.h>
00037 #include <Epetra_MultiVector.h>
00038 class Epetra_IntSerialDenseVector;
00039 class Epetra_SerialDenseVector;
00040 
00061 class Epetra_FEVector : public Epetra_MultiVector {
00062  public:
00068    Epetra_FEVector(const Epetra_BlockMap& Map,
00069        bool ignoreNonLocalEntries=false);
00070 
00072   Epetra_FEVector(const Epetra_FEVector& source);
00073 
00075    virtual ~Epetra_FEVector();
00076 
00080    int SumIntoGlobalValues(int numIDs, const int* GIDs, const double* values);
00081 
00091    int SumIntoGlobalValues(const Epetra_IntSerialDenseVector& GIDs,
00092          const Epetra_SerialDenseVector& values);
00093 
00097    int ReplaceGlobalValues(int numIDs, const int* GIDs, const double* values);
00098 
00108    int ReplaceGlobalValues(const Epetra_IntSerialDenseVector& GIDs,
00109          const Epetra_SerialDenseVector& values);
00110 
00111    int SumIntoGlobalValues(int numIDs, const int* GIDs,
00112          const int* numValuesPerID,
00113          const double* values);
00114 
00115    int ReplaceGlobalValues(int numIDs, const int* GIDs,
00116          const int* numValuesPerID,
00117          const double* values);
00118 
00126    int GlobalAssemble(Epetra_CombineMode mode = Add);
00127 
00130    void setIgnoreNonLocalEntries(bool flag) {
00131      ignoreNonLocalEntries_ = flag;
00132    }
00133 
00134    Epetra_FEVector& operator=(const Epetra_FEVector& source);
00135 
00136  private:
00137   int inputValues(int numIDs,
00138                   const int* GIDs, const double* values,
00139                   bool accumulate);
00140 
00141   int inputValues(int numIDs,
00142                   const int* GIDs, const int* numValuesPerID,
00143       const double* values,
00144                   bool accumulate);
00145 
00146   int inputNonlocalValue(int GID, double value, bool accumulate);
00147 
00148   int inputNonlocalValues(int GID, int numValues, const double* values,
00149         bool accumulate);
00150 
00151   void destroyNonlocalData();
00152 
00153   int myFirstID_;
00154   int myNumIDs_;
00155   double* myCoefs_;
00156 
00157   int* nonlocalIDs_;
00158   int* nonlocalElementSize_;
00159   int numNonlocalIDs_;
00160   int allocatedNonlocalLength_;
00161   double** nonlocalCoefs_;
00162 
00163   bool ignoreNonLocalEntries_;
00164 };
00165 
00166 #endif
00167 

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