FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_VectorTraits.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _fei_VectorTraits_hpp_
10 #define _fei_VectorTraits_hpp_
11 
12 #include <fei_macros.hpp>
13 
14 namespace fei {
15 
51  template<typename T>
52  struct VectorTraits {
53 
58  static const char* typeName();
59 
62  static int setValues(T* vec, int firstLocalOffset,
63  double scalar, bool isSolnVector=false);
64 
73  static int putValuesIn(T* vec, int firstLocalOffset,
74  int numValues,
75  const int* indices,
76  const double* values,
77  bool sum_into,
78  bool isSolnVector=false,
79  int vectorIndex=0);
80 
84  static int copyOut(T* vec, int firstLocalOffset,
85  int numValues, const int* indices, double* values,
86  bool isSolnVector=false,
87  int vectorIndex=0);
88 
92  static double* getLocalCoefsPtr(T* vec,
93  bool isSolnVector=false,
94  int vectorIndex=0);
95 
98  static int update(T* vec,
99  double a,
100  const T* x,
101  double b);
102 
108  static int globalAssemble(T* vec);
109 
110  };//struct VectorTraits
111 }//namespace fei
112 
113 #endif // _fei_VectorTraits_hpp_
static int putValuesIn(T *vec, int firstLocalOffset, int numValues, const int *indices, const double *values, bool sum_into, bool isSolnVector=false, int vectorIndex=0)
static int globalAssemble(T *vec)
static int update(T *vec, double a, const T *x, double b)
static int setValues(T *vec, int firstLocalOffset, double scalar, bool isSolnVector=false)
static double * getLocalCoefsPtr(T *vec, bool isSolnVector=false, int vectorIndex=0)
static int copyOut(T *vec, int firstLocalOffset, int numValues, const int *indices, double *values, bool isSolnVector=false, int vectorIndex=0)
static const char * typeName()