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 
00056 class Epetra_FEVector : public Epetra_MultiVector {
00057  public:
00073    Epetra_FEVector(const Epetra_BlockMap& Map,
00074                    int numVectors=1,
00075        bool ignoreNonLocalEntries=false);
00076 
00078   Epetra_FEVector(const Epetra_FEVector& source);
00079 
00081    virtual ~Epetra_FEVector();
00082 
00086    int SumIntoGlobalValues(int numIDs,
00087                            const int* GIDs, const double* values,
00088                            int vectorIndex=0);
00089 
00099    int SumIntoGlobalValues(const Epetra_IntSerialDenseVector& GIDs,
00100          const Epetra_SerialDenseVector& values,
00101                            int vectorIndex=0);
00102 
00106    int ReplaceGlobalValues(int numIDs, const int* GIDs, const double* values,
00107                            int vectorIndex=0);
00108 
00118    int ReplaceGlobalValues(const Epetra_IntSerialDenseVector& GIDs,
00119          const Epetra_SerialDenseVector& values,
00120                            int vectorIndex=0);
00121 
00122    int SumIntoGlobalValues(int numIDs,
00123                            const int* GIDs,
00124          const int* numValuesPerID,
00125          const double* values,
00126                            int vectorIndex=0);
00127 
00128    int ReplaceGlobalValues(int numIDs, const int* GIDs,
00129          const int* numValuesPerID,
00130          const double* values,
00131                            int vectorIndex=0);
00132 
00140    int GlobalAssemble(Epetra_CombineMode mode = Add);
00141 
00144    void setIgnoreNonLocalEntries(bool flag) {
00145      ignoreNonLocalEntries_ = flag;
00146    }
00147 
00148    Epetra_FEVector& operator=(const Epetra_FEVector& source);
00149 
00150  private:
00151   int inputValues(int numIDs,
00152                   const int* GIDs, const double* values,
00153                   bool suminto,
00154                   int vectorIndex);
00155 
00156   int inputValues(int numIDs,
00157                   const int* GIDs, const int* numValuesPerID,
00158       const double* values,
00159                   bool suminto,
00160                   int vectorIndex);
00161 
00162   int inputNonlocalValue(int GID, double value, bool suminto,
00163                          int vectorIndex);
00164 
00165   int inputNonlocalValues(int GID, int numValues, const double* values,
00166         bool suminto, int vectorIndex);
00167 
00168   void destroyNonlocalData();
00169 
00170   int myFirstID_;
00171   int myNumIDs_;
00172 
00173   int* nonlocalIDs_;
00174   int* nonlocalElementSize_;
00175   int numNonlocalIDs_;
00176   int numNonlocalIDsAlloc_;
00177   double** nonlocalCoefs_;
00178   int numNonlocalCoefs_;
00179   int numNonlocalCoefsAlloc_;
00180 
00181   bool ignoreNonLocalEntries_;
00182 };
00183 
00184 #endif
00185 

Generated on Wed May 12 21:41:05 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7