FEI Version of the Day
snl_fei_FEVectorTraits_FED.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 _snl_fei_FEVectorTraits_FED_hpp_
00010 #define _snl_fei_FEVectorTraits_FED_hpp_
00011 
00012 #include <fei_macros.hpp>
00013 
00014 #include <snl_fei_FEVectorTraits.hpp>
00015 #include <fei_FiniteElementData.hpp>
00016 
00017 namespace snl_fei {
00018 
00022   template<>
00023   struct FEVectorTraits<FiniteElementData> {
00024 
00026     static const char* typeName()
00027       { return("FiniteElementData"); }
00028 
00031     static int reset(FiniteElementData* vec)
00032       { return( vec->reset() ); }
00033 
00035     static int sumInElemVector(FiniteElementData* vec,
00036              int elemBlockID,
00037              int elemID,
00038              int numNodes,
00039              const int* nodeNumbers,
00040              const int* dofPerNode,
00041              const int* dof_ids,
00042              const double* coefs)
00043       {
00044   return( vec->setElemVector(elemBlockID, elemID, numNodes,
00045            nodeNumbers, dofPerNode, dof_ids, coefs) );
00046       }
00047 
00049     static int copyOut(FiniteElementData* vec,
00050            int nodeNumber,
00051            int dofOffset,
00052            double& value)
00053       {
00054   return( vec->getSolnEntry(nodeNumber, dofOffset, value) );
00055       }
00056 
00057   };//struct FEVectorTraits
00058 }//namespace snl_fei
00059 
00060 #endif // _snl_fei_FEVectorTraits_FED_hpp_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends