Sierra Toolkit Version of the Day
base/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 Traitss Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 
00010 #ifndef stk_mesh_base_FieldTraits_hpp
00011 #define stk_mesh_base_FieldTraits_hpp
00012 
00013 #include <stk_mesh/base/FieldBase.hpp>
00014 #include <stk_mesh/base/Field.hpp>
00015 
00016 #include <Shards_Array.hpp>
00017 
00018 namespace stk {
00019 namespace mesh {
00020 
00021 template<>
00022 struct FieldTraits<FieldBase>
00023 {
00024 public:
00025   typedef shards::array_traits::Helper<void,shards::RankZero,
00026                                        void,void,void,void,void,void,void,void>
00027     Helper ;
00028 
00029   typedef void data_type ; 
00030   typedef void   tag1 ;      
00031   typedef void   tag2 ;      
00032   typedef void   tag3 ;      
00033   typedef void   tag4 ;      
00034   typedef void   tag5 ;      
00035   typedef void   tag6 ;      
00036   typedef void   tag7 ;      
00037 
00039   enum { Rank = 0 };
00040 
00041   static void assign_tags( const shards::ArrayDimTag ** tags ) {}
00042 };
00043 
00044 
00046 template< typename Scalar >
00047 struct FieldTraits< Field<Scalar,void,void,void,void,void,void,void> >
00048 {
00049 public:
00050   typedef shards::array_traits::Helper<Scalar,shards::RankZero,
00051                                        void,void,void,void,void,void,void,void>
00052     Helper ;
00053 
00054   typedef Scalar data_type ; 
00055   typedef void   tag1 ;      
00056   typedef void   tag2 ;      
00057   typedef void   tag3 ;      
00058   typedef void   tag4 ;      
00059   typedef void   tag5 ;      
00060   typedef void   tag6 ;      
00061   typedef void   tag7 ;      
00062 
00064   enum { Rank = 0 };
00065 
00066   static void assign_tags( const shards::ArrayDimTag ** tags ) {}
00067 };
00068 
00070 template< typename Scalar ,
00071           class Tag1 , class Tag2 , class Tag3 , class Tag4 ,
00072           class Tag5 , class Tag6 , class Tag7 >
00073 struct FieldTraits< Field<Scalar,Tag1,Tag2,Tag3,Tag4,Tag5,Tag6,Tag7> >
00074 {
00075 public:
00076   typedef shards::array_traits::Helper<Scalar,shards::FortranOrder,
00077                                        Tag1,Tag2,Tag3,Tag4,Tag5,Tag6,Tag7,void>
00078     Helper ;
00079 
00080   typedef Scalar data_type ; 
00081   typedef Tag1   tag1 ;      
00082   typedef Tag2   tag2 ;      
00083   typedef Tag3   tag3 ;      
00084   typedef Tag4   tag4 ;      
00085   typedef Tag5   tag5 ;      
00086   typedef Tag6   tag6 ;      
00087   typedef Tag7   tag7 ;      
00088 
00090   enum { Rank = Helper::Rank };
00091 
00092   static void assign_tags( const shards::ArrayDimTag ** tags )
00093     { Helper::assign_tags( tags ); }
00094 };
00095 
00096 
00097 } //namespace mesh
00098 } //namespace stk
00099 
00100 #endif //stk_mesh_base_FieldTraits_hpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends