fei_VectorTraits_LinProbMgr.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_LinProbMgr_hpp_
00010 #define _fei_VectorTraits_LinProbMgr_hpp_
00011 
00012 
00013 #include <fei_VectorTraits.hpp>
00014 #include <fei_LinearProblemManager.hpp>
00015 
00016 namespace fei {
00017 
00021   template<>
00022   struct VectorTraits<fei::LinearProblemManager>  {
00023 
00025     static const char* typeName()
00026       { return("fei::LinearProblemManager"); }
00027 
00030     static int setValues(fei::LinearProblemManager* vec, int firstLocalOffset,
00031                          double scalar, bool isSolnVector=false)
00032       {
00033         vec->setVectorValues(scalar, isSolnVector);
00034         return(0);
00035       }
00036 
00040     static int putValuesIn(fei::LinearProblemManager* vec,
00041          int firstLocalOffset,
00042          int numValues, const int* indices, const double* values,
00043                      bool sum_into,
00044          bool isSolnVector=false,
00045          int vectorIndex=0)
00046       {
00047         int err = vec->insertVectorValues(numValues, indices, values,
00048                                           sum_into, isSolnVector, vectorIndex);
00049   return(err);
00050       }
00051 
00055     static int copyOut(fei::LinearProblemManager* vec,
00056            int firstLocalOffset,
00057            int numValues, const int* indices, double* values,
00058            bool isSolnVector=false,
00059            int vectorIndex=0)
00060       {
00061         int err = vec->copyOutVectorValues(numValues, indices, values,
00062                                            isSolnVector, vectorIndex);
00063         return(err);
00064       }
00065 
00067     static int globalAssemble(fei::LinearProblemManager* vec)
00068       { return( vec->globalAssemble() ); }
00069 
00072     static int update(fei::LinearProblemManager* vec,
00073           double a,
00074           const fei::LinearProblemManager* x,
00075           double b)
00076     { return(-1); }
00077 
00078   };//struct VectorTraits
00079 }//namespace fei
00080 
00081 #endif // _fei_VectorTraits_LinProbMgr_hpp_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:24 2011 for FEI by  doxygen 1.6.3