Sierra Toolkit Version of the Day
CoordinateSystems.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_fem_CoordinateSystems_hpp
00011 #define stk_mesh_fem_CoordinateSystems_hpp
00012 
00013 //----------------------------------------------------------------------
00014 
00015 #include <Shards_Array.hpp>
00016 
00017 namespace stk {
00018 namespace mesh {
00019 
00029 struct Cartesian : public shards::ArrayDimTag {
00030 
00031   enum { Size = 3 };                    
00032 
00033   enum { X = 0 , Y = 1 , Z = 2 };       
00034 
00035   const char * name() const ;
00036   std::string to_string( size_type size , size_type index ) const ;
00037   size_type    to_index(  size_type size , const std::string & ) const ;
00038   static const Cartesian & tag();       
00039 
00040 private:
00041   Cartesian() {}
00042   Cartesian( const Cartesian & );
00043   Cartesian & operator = ( const Cartesian & );
00044 };
00045 
00052 struct Cylindrical : public shards::ArrayDimTag {
00053 
00054   enum { Radius = 0 , R = 0 ,           
00055          Angle = 1 ,  A = 1 ,
00056          Z = 2 };
00057 
00058   const char * name() const ;
00059   std::string to_string( size_type size , size_type index ) const ;
00060   size_type    to_index(  size_type size , const std::string & ) const ;
00061   static const Cylindrical & tag(); 
00062 
00063 private:
00064   Cylindrical() {}
00065   Cylindrical( const Cylindrical & );
00066   Cylindrical & operator = ( const Cylindrical & );
00067 };
00068 
00075 struct FullTensor : public shards::ArrayDimTag {
00076 
00077   enum { Size = 9 };
00078 
00079   enum { XX = 0 , XY = 3 , XZ = 6 ,
00080          YX = 1 , YY = 4 , YZ = 7 ,
00081          ZX = 2 , ZY = 5 , ZZ = 8 };
00082 
00083   const char * name() const ;
00084   std::string to_string( size_type, size_type) const  ;
00085   size_type    to_index(  size_type, const std::string & ) const  ;
00086   static const FullTensor & tag(); 
00087 
00088 private:
00089   FullTensor() {}
00090   FullTensor( const FullTensor & );
00091   FullTensor & operator = ( const FullTensor & );
00092 };
00093 
00094 //----------------------------------------------------------------------
00095 
00102 struct SymmetricTensor : public shards::ArrayDimTag {
00103 
00104   enum { Size = 6 };
00105 
00106   enum { XX = 0 , YY = 1 , ZZ = 2, XY = 3, YZ = 4, XZ = 5 };
00107 
00108   const char * name() const  ;
00109   std::string to_string( size_type, size_type) const  ;
00110   size_type    to_index(  size_type , const std::string & ) const ;
00111   static const SymmetricTensor & tag(); 
00112 
00113 private:
00114   SymmetricTensor() {}
00115   SymmetricTensor( const SymmetricTensor & );
00116   SymmetricTensor & operator = ( const SymmetricTensor & );
00117 };
00118 
00119 //----------------------------------------------------------------------
00120 
00123 } //namespace mesh
00124 } //namespace stk
00125 
00126 #endif //stk_mesh_fem_CoordinateSystems_hpp
00127 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends