Sierra Toolkit Version of the Day
generic_mesh_traits.hpp
00001 #ifndef STK_UTIL_GENERIC_MESH_TRAITS_HPP
00002 #define STK_UTIL_GENERIC_MESH_TRAITS_HPP
00003 
00004 
00005 namespace stk {
00006 
00007 template <typename Mesh>
00008 struct generic_mesh_traits {
00009   // persistant through modifications (up to change owner):
00010   //typedef typename Mesh::entity_global_id                entity_global_id;
00011 
00012   // persistant through modifications (up to change owner):
00013   typedef typename Mesh::entity_local_id                entity_local_id;
00014   // not-persistant through modifications (up to change owner):
00015   typedef typename Mesh::entity_descriptor              entity_descriptor;
00016   // entity_descriptor_iterator de-references to an entity_descriptor:
00017   typedef typename Mesh::entity_descriptor_iterator     entity_descriptor_iterator;
00018   typedef typename Mesh::entity_value                   entity_value;
00019   typedef typename Mesh::entity_size_type               entity_size_type; // not used yet
00020 
00021 
00022   typedef typename Mesh::part_descriptor                part_descriptor;
00023   // part_descriptor_iterator de-references to a part_descriptor:
00024   typedef typename Mesh::part_descriptor_iterator       part_descriptor_iterator;
00025   typedef typename Mesh::part_value                     part_value;
00026   typedef typename Mesh::part_size_type                 part_size_type; // not used yet
00027 
00028   typedef typename Mesh::bucket_descriptor              bucket_descriptor;
00029   // bucket_descriptor_iterator de-references to a bucket_descriptor:
00030   typedef typename Mesh::bucket_descriptor_iterator     bucket_descriptor_iterator;
00031   typedef typename Mesh::bucket_value                   bucket_value; // not used yet
00032   typedef typename Mesh::bucket_size_type               bucket_size_type; // not used yet
00033   // potentially heavy bucket_descriptor_iterator:
00034   typedef typename Mesh::selected_bucket_descriptor_iterator selected_bucket_descriptor_iterator;
00035 
00036   // potentially heavy bucket_descriptor_iterator:
00037   typedef typename Mesh::part_bucket_descriptor_iterator part_bucket_descriptor_iterator;
00038   typedef typename Mesh::part_bucket_size_type          part_bucket_size_type; // not used yet
00039 
00040   // potentially heavy part_descriptor_iterator:
00041   typedef typename Mesh::bucket_part_descriptor_iterator bucket_part_descriptor_iterator;
00042   typedef typename Mesh::bucket_part_size_type          bucket_part_size_type; // not used yet
00043 
00044   // potentially heavy entity_descriptor_iterator:
00045   typedef typename Mesh::bucket_entity_descriptor_iterator bucket_entity_descriptor_iterator;
00046   typedef typename Mesh::bucket_entity_size_type        bucket_entity_size_type; // not used yet
00047 
00048   inline part_descriptor                                universal_part();
00049 
00050   static inline part_descriptor                         null_part();
00051   static inline bucket_descriptor                       null_bucket();
00052   static inline entity_local_id                         null_entity();
00053   static inline relation_descriptor                     null_relation();
00054 
00055   typedef typename Mesh::relation_descriptor            relation_descriptor;
00056   typedef typename Mesh::relation_descriptor_iterator   relation_descriptor_iterator;
00057   typedef typename Mesh::selected_relation_descriptor_iterator selected_relation_descriptor_iterator
00058   typedef typename Mesh::relation_value                 relation_value; // not used yet
00059   typedef typename Mesh::relation_size_type             relation_size_type; // not used yet
00060 };
00061 
00062 
00063 // Note:  A Selector is a unary-predicate that accepts the appropriate type
00064 // for the function being used and returns a boolean.
00065 
00066 template <typename Mesh>
00067 inline typename generic_mesh_traits<Mesh>::part_descriptor
00068 generic_mesh_traits<Mesh>::universal_part()
00069 { return Mesh::universal_part(); }
00070 
00071 template <typename Mesh>
00072 inline typename generic_mesh_traits<Mesh>::part_descriptor
00073 generic_mesh_traits<Mesh>::null_part()
00074 { return Mesh::null_part(); }
00075 
00076 template <typename Mesh>
00077 inline typename generic_mesh_traits<Mesh>::bucket_descriptor
00078 generic_mesh_traits<Mesh>::null_bucket()
00079 { return Mesh::null_bucket(); }
00080 
00081 template <typename Mesh>
00082 inline typename generic_mesh_traits<Mesh>::entity_local_id
00083 generic_mesh_traits<Mesh>::null_entity()
00084 { return Mesh::null_entity(); }
00085 
00086 template <typename Mesh>
00087 inline typename generic_mesh_traits<Mesh>::relation_descriptor
00088 generic_mesh_traits<Mesh>::null_relation()
00089 { return Mesh::null_relation(); }
00090 
00091 
00092 } // namespace stk
00093 
00094 
00095 #endif // STK_UTIL_GENERIC_MESH_TRAITS_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines