FieldTraits.hpp

00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 
00010 #ifndef stk_mesh_FieldTraits_hpp
00011 #define stk_mesh_FieldTraits_hpp
00012 
00013 //----------------------------------------------------------------------
00014 
00015 #include <Shards_Array.hpp>
00016 
00017 namespace stk {
00018 namespace mesh {
00019 
00020 using shards::ArrayDimTag;
00021 
00031 struct Cartesian : public ArrayDimTag {
00032 
00033   enum { Size = 3 };                    
00034 
00035   enum { X = 0 , Y = 1 , Z = 2 };       
00036 
00037   const char * name() const ;
00038   std::string to_string( size_type size , size_type index ) const ;
00039   size_type    to_index(  size_type size , const std::string & ) const ;
00040   static const Cartesian & tag();       
00041 
00042 private:
00043   Cartesian() {}
00044   Cartesian( const Cartesian & );
00045   Cartesian & operator = ( const Cartesian & );
00046 };
00047 
00054 struct Cylindrical : public ArrayDimTag {
00055 
00056   enum { Radius = 0 , R = 0 ,           
00057          Angle = 1 ,  A = 1 ,
00058          Z = 2 };
00059 
00060   const char * name() const ;
00061   std::string to_string( size_type size , size_type index ) const ;
00062   size_type    to_index(  size_type size , const std::string & ) const ;
00063   static const Cylindrical & tag(); 
00064 
00065 private:
00066   Cylindrical() {}
00067   Cylindrical( const Cylindrical & );
00068   Cylindrical & operator = ( const Cylindrical & );
00069 };
00070 
00077 struct FullTensor : public ArrayDimTag {
00078 
00079   enum { Size = 9 };
00080 
00081   enum { XX = 0 , XY = 3 , XZ = 6 ,
00082          YX = 1 , YY = 4 , YZ = 7 ,
00083          ZX = 2 , ZY = 5 , ZZ = 8 };
00084 
00085   const char * name() const ;
00086   std::string to_string( size_type, size_type) const  ;
00087   size_type    to_index(  size_type, const std::string & ) const  ;
00088   static const FullTensor & tag(); 
00089 
00090 private:
00091   FullTensor() {}
00092   FullTensor( const FullTensor & );
00093   FullTensor & operator = ( const FullTensor & );
00094 };
00095 
00096 //----------------------------------------------------------------------
00097 
00104 struct SymmetricTensor : public ArrayDimTag {
00105 
00106   enum { Size = 6 };
00107 
00108   enum { XX = 0 , YY = 1 , ZZ = 2, XY = 3, YZ = 4, XZ = 5 };
00109 
00110   const char * name() const  ;
00111   std::string to_string( size_type, size_type) const  ;
00112   size_type    to_index(  size_type , const std::string & ) const ;
00113   static const SymmetricTensor & tag(); 
00114 
00115 private:
00116   SymmetricTensor() {}
00117   SymmetricTensor( const SymmetricTensor & );
00118   SymmetricTensor & operator = ( const SymmetricTensor & );
00119 };
00120 
00121 //----------------------------------------------------------------------
00122 
00125 } //namespace mesh
00126 } //namespace stk
00127 
00128 #endif
00129 

Generated on Tue Jul 13 09:27:32 2010 for Sierra Toolkit by  doxygen 1.4.7