fei_MatrixTraits.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_MatrixTraits_hpp_
00010 #define _fei_MatrixTraits_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 
00014 namespace fei {
00015   class Vector;
00016 
00044   template<typename T>
00045   struct MatrixTraits {
00046 
00051     static const char* typeName()
00052       { return("unsupported"); }
00053 
00056     static int setValues(T* mat, double scalar)
00057       { return(-1); }
00058 
00062     static int getNumLocalRows(T* mat, int& numRows)
00063       { return(-1); }
00064 
00068     static int getRowLength(T* mat, int row, int& length)
00069       { return(-1); }
00070 
00083     static int copyOutRow(T* mat,
00084           int row, int len, double* coefs, int* indices)
00085       { return(-1); }
00086 
00091     static int putValuesIn(T* mat,
00092                            int numRows, const int* rows,
00093                            int numCols, const int* cols,
00094                            const double* const* values,
00095                            bool sum_into)
00096       { return(-1); }
00097 
00104     static int globalAssemble(T* A)
00105     { return(0); }
00106 
00110     static int matvec(T* A, fei::Vector* x, fei::Vector* y)
00111     { return(-1); }
00112   };//struct MatrixTraits
00113 
00114 }//namespace fei
00115 
00116 #endif // _fei_MatrixTraits_hpp_
00117 
 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