FEI Version of the Day
fei_MatrixTraits_FEData.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_FEData_hpp_
00010 #define _fei_MatrixTraits_FEData_hpp_
00011 
00012 //This file defines matrix traits for FiniteElementData matrices
00013 //
00014 
00015 #include <fei_FiniteElementData.hpp>
00016 
00017 namespace fei {
00018 
00020   template<>
00021   struct MatrixTraits<FiniteElementData> {
00022 
00024     static const char* typeName()
00025       { return("FiniteElementData"); }
00026 
00027     static double* getBeginPointer(FiniteElementData* fed)
00028       {
00029         return NULL;
00030       }
00031 
00032     static int getOffset(FiniteElementData* /*fed*/, int row, int col)
00033       {
00034         return -1;
00035       }
00036 
00039     static int setValues(FiniteElementData* fed, double scalar)
00040       {
00041   return( -1 );
00042       }
00043 
00047     static int getNumLocalRows(FiniteElementData* fed, int& numRows)
00048     {
00049       numRows = -1;
00050       return(-1);
00051     }
00052 
00055     static int getRowLength(FiniteElementData* fed, int row, int& length)
00056       {
00057   return( -1 );
00058       }
00059 
00072     static int copyOutRow(FiniteElementData* fed,
00073           int row, int len, double* coefs, int* indices)
00074       {
00075   return( -1 );
00076       }
00077 
00080     static int putValuesIn(FiniteElementData* fed,
00081          int numRows, const int* rows,
00082          int numCols, const int* cols,
00083          const double* const* values,
00084                           bool sum_into)
00085       {
00086   return( -1 );
00087       }
00088 
00093     static int globalAssemble(FiniteElementData* fed)
00094     {
00095       return( fed->loadComplete() );
00096     }
00097 
00099     static int matvec(FiniteElementData* fed,
00100           fei::Vector* x,
00101           fei::Vector* y)
00102     {
00103       return(-1);
00104     }
00105 
00106   };//struct MatrixTraits
00107 }//namespace fei
00108 
00109 
00110 #endif // _fei_MatrixTraits_FEData_hpp_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends