44 #ifndef _fei_VectorTraits_CSVec_hpp_
45 #define _fei_VectorTraits_CSVec_hpp_
47 #include <fei_VectorTraits.hpp>
48 #include <fei_CSVec.hpp>
52 struct VectorTraits<CSVec> {
56 static int setValues(CSVec* vec,
int firstLocalOffset,
57 double scalar,
bool isSolnVector=
false)
59 set_values(*vec, scalar);
65 int numValues,
const int* indices,
const double* values,
67 bool isSolnVector=
false,
71 for(
int i=0; i<numValues; ++i) {
72 if (indices[i] < 0)
continue;
73 add_entry(*vec, indices[i], values[i]);
77 for(
int i=0; i<numValues; ++i) {
78 if (indices[i] < 0)
continue;
79 put_entry(*vec, indices[i], values[i]);
88 int numValues,
const int* indices,
double* values,
89 bool isSolnVector=
false,
92 for(
int i=0; i<numValues; ++i) {
94 values[i] = get_entry(*vec, indices[i]);
101 static int update(CSVec* vec,
110 #endif // _fei_VectorTraits_CSVec_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 update(T *vec, double a, const T *x, double b)
static int setValues(T *vec, int firstLocalOffset, double scalar, bool isSolnVector=false)
static int copyOut(T *vec, int firstLocalOffset, int numValues, const int *indices, double *values, bool isSolnVector=false, int vectorIndex=0)
static const char * typeName()