FEI Version of the Day
fei_VectorTraits.hpp
00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 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_VectorTraits_hpp_
00010 #define _fei_VectorTraits_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 
00014 namespace fei {
00015 
00051   template<typename T>
00052     struct VectorTraits {
00053 
00058       static const char* typeName();
00059 
00062       static int setValues(T* vec, int firstLocalOffset,
00063          double scalar, bool isSolnVector=false);
00064 
00073       static int putValuesIn(T* vec, int firstLocalOffset,
00074            int numValues,
00075                              const int* indices,
00076                              const double* values,
00077                              bool sum_into,
00078                              bool isSolnVector=false,
00079                              int vectorIndex=0);
00080 
00084       static int copyOut(T* vec, int firstLocalOffset,
00085        int numValues, const int* indices, double* values,
00086        bool isSolnVector=false,
00087        int vectorIndex=0);
00088 
00092       static double* getLocalCoefsPtr(T* vec,
00093                                       bool isSolnVector=false,
00094                                       int vectorIndex=0);
00095 
00098       static int update(T* vec,
00099       double a,
00100       const T* x,
00101       double b);
00102 
00108       static int globalAssemble(T* vec);
00109 
00110     };//struct VectorTraits
00111 }//namespace fei
00112 
00113 #endif // _fei_VectorTraits_hpp_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends