|
Sierra Toolkit
Version of the Day
|
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_classic { 00019 namespace mesh { 00020 00030 template<> 00031 struct FieldTraits<FieldBase> 00032 { 00033 public: 00034 typedef shards::array_traits::Helper<void,shards::RankZero, 00035 void,void,void,void,void,void,void,void> 00036 Helper ; 00037 00038 typedef void data_type ; 00039 typedef void tag1 ; 00040 typedef void tag2 ; 00041 typedef void tag3 ; 00042 typedef void tag4 ; 00043 typedef void tag5 ; 00044 typedef void tag6 ; 00045 typedef void tag7 ; 00046 00048 enum { Rank = 0 }; 00049 00050 static void assign_tags( const shards::ArrayDimTag ** tags ) {} 00051 }; 00052 00053 00055 template< typename Scalar > 00056 struct FieldTraits< Field<Scalar,void,void,void,void,void,void,void> > 00057 { 00058 public: 00059 typedef shards::array_traits::Helper<Scalar,shards::RankZero, 00060 void,void,void,void,void,void,void,void> 00061 Helper ; 00062 00063 typedef Scalar data_type ; 00064 typedef void tag1 ; 00065 typedef void tag2 ; 00066 typedef void tag3 ; 00067 typedef void tag4 ; 00068 typedef void tag5 ; 00069 typedef void tag6 ; 00070 typedef void tag7 ; 00071 00073 enum { Rank = 0 }; 00074 00075 static void assign_tags( const shards::ArrayDimTag ** tags ) {} 00076 }; 00077 00079 template< typename Scalar , 00080 class Tag1 , class Tag2 , class Tag3 , class Tag4 , 00081 class Tag5 , class Tag6 , class Tag7 > 00082 struct FieldTraits< Field<Scalar,Tag1,Tag2,Tag3,Tag4,Tag5,Tag6,Tag7> > 00083 { 00084 public: 00085 typedef shards::array_traits::Helper<Scalar,shards::FortranOrder, 00086 Tag1,Tag2,Tag3,Tag4,Tag5,Tag6,Tag7,void> 00087 Helper ; 00088 00089 typedef Scalar data_type ; 00090 typedef Tag1 tag1 ; 00091 typedef Tag2 tag2 ; 00092 typedef Tag3 tag3 ; 00093 typedef Tag4 tag4 ; 00094 typedef Tag5 tag5 ; 00095 typedef Tag6 tag6 ; 00096 typedef Tag7 tag7 ; 00097 00099 enum { Rank = Helper::Rank }; 00100 00101 static void assign_tags( const shards::ArrayDimTag ** tags ) 00102 { Helper::assign_tags( tags ); } 00103 }; 00104 00105 00106 } //namespace mesh 00107 } //namespace stk_classic 00108 00109 #endif //stk_mesh_base_FieldTraits_hpp