FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_VectorTraits_LinProbMgr.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_LinProbMgr_hpp_
10 #define _fei_VectorTraits_LinProbMgr_hpp_
11 
12 
13 #include <fei_VectorTraits.hpp>
14 #include <fei_LinearProblemManager.hpp>
15 
16 namespace fei {
17 
21  template<>
23 
25  static const char* typeName()
26  { return("fei::LinearProblemManager"); }
27 
30  static int setValues(fei::LinearProblemManager* vec, int firstLocalOffset,
31  double scalar, bool isSolnVector=false)
32  {
33  vec->setVectorValues(scalar, isSolnVector);
34  return(0);
35  }
36 
41  int firstLocalOffset,
42  int numValues, const int* indices, const double* values,
43  bool sum_into,
44  bool isSolnVector=false,
45  int vectorIndex=0)
46  {
47  int err = vec->insertVectorValues(numValues, indices, values,
48  sum_into, isSolnVector, vectorIndex);
49  return(err);
50  }
51 
56  int firstLocalOffset,
57  int numValues, const int* indices, double* values,
58  bool isSolnVector=false,
59  int vectorIndex=0)
60  {
61  int err = vec->copyOutVectorValues(numValues, indices, values,
62  isSolnVector, vectorIndex);
63  return(err);
64  }
65 
68  { return( vec->globalAssemble() ); }
69 
73  double a,
75  double b)
76  { return(-1); }
77 
78  };//struct VectorTraits
79 }//namespace fei
80 
81 #endif // _fei_VectorTraits_LinProbMgr_hpp_
virtual int insertVectorValues(int numValues, const int *globalIndices, const double *values, bool sum_into, bool soln_vector, int vectorIndex=0)=0
static int globalAssemble(fei::LinearProblemManager *vec)
virtual int copyOutVectorValues(int numValues, const int *globalIndices, double *values, bool soln_vector, int vectorIndex=0)=0
virtual void setVectorValues(double scalar, bool soln_vector)=0
static int update(fei::LinearProblemManager *vec, double a, const fei::LinearProblemManager *x, double b)
static int copyOut(fei::LinearProblemManager *vec, int firstLocalOffset, int numValues, const int *indices, double *values, bool isSolnVector=false, int vectorIndex=0)
static int putValuesIn(fei::LinearProblemManager *vec, int firstLocalOffset, int numValues, const int *indices, const double *values, bool sum_into, bool isSolnVector=false, int vectorIndex=0)
virtual int globalAssemble()=0
static int setValues(fei::LinearProblemManager *vec, int firstLocalOffset, double scalar, bool isSolnVector=false)