Sierra Toolkit Version of the Day
Types.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 #ifndef stk_mesh_Types_hpp
00010 #define stk_mesh_Types_hpp
00011 
00012 //----------------------------------------------------------------------
00013 
00014 #include <stdint.h>
00015 #include <limits>
00016 #include <utility>
00017 #include <vector>
00018 
00019 #include <stk_util/util/PairIter.hpp>
00020 #include <stk_util/util/NamedPair.hpp>
00021 
00022 namespace stk {
00023 namespace mesh {
00024 
00025 //----------------------------------------------------------------------
00030 class MetaData ;  // Meta-data description of a mesh
00031 class Part ;      // Defined subset of the mesh
00032 
00036 typedef std::vector< Part * > PartVector ;
00037 
00038 class FieldBase;
00039 
00040 template< typename Scalar = void ,
00041           class Tag1 = void , class Tag2 = void ,
00042           class Tag3 = void , class Tag4 = void ,
00043           class Tag5 = void , class Tag6 = void ,
00044           class Tag7 = void >
00045   class Field ;
00046 
00051 enum { MaximumFieldDimension = 7 };
00052 
00053 template< typename DataType = void > class Property ;
00054 
00055 typedef Property< void > PropertyBase ;
00056 
00059 //----------------------------------------------------------------------
00064 class BulkData ; // Bulk-data of a mesh
00065 class Bucket ;   // Homogeneous collection of mesh entitities their field data
00066 class Entity ;   // Individual entity within the mesh
00067 class Relation ; // Relation pair of local mesh entities
00068 class Ghosting ;
00069 
00070 typedef std::vector<Entity *> EntityVector;
00071 
00075 enum EntityModificationLog { EntityLogNoChange = 0 ,
00076                              EntityLogCreated  = 1 ,
00077                              EntityLogModified = 2 ,
00078                              EntityLogDeleted  = 3 };
00079 
00080 template< class FieldType > struct EntityArray ;
00081 template< class FieldType > struct BucketArray ;
00082 template< class FieldType > struct FieldTraits ;
00083 
00084 
00085 typedef unsigned EntityRank ;
00086 typedef uint64_t EntityId ;
00087 
00088 // Base Entity Rank 
00089 // Note:  This BaseEntityRank can be considered the leaf of a tree and it
00090 // represents the furthest out you can go in downward relations.
00091 enum { BaseEntityRank = EntityRank(0) };
00092 
00093 
00094 typedef unsigned Ordinal;
00095 typedef Ordinal PartOrdinal;
00096 typedef Ordinal FieldOrdinal;
00097 
00098 //----------------------------------------------------------------------
00104 typedef std::pair<Entity*,unsigned> EntityProc ;
00105 
00109 typedef PairIter< std::vector< EntityProc >::const_iterator >
00110   PairIterEntityProc ;
00111 
00112 NAMED_PAIR( EntityCommInfo , unsigned , ghost_id , unsigned , proc )
00113 
00114 
00117 typedef PairIter< std::vector< EntityCommInfo >::const_iterator >
00118   PairIterEntityComm ;
00119 
00120 typedef std::vector<EntityCommInfo> EntityCommInfoVector;
00121 
00124 //----------------------------------------------------------------------
00139 typedef int ( * relation_stencil_ptr )( unsigned  from_type ,
00140                                         unsigned  to_type ,
00141                                         unsigned  identifier );
00142 
00143 //----------------------------------------------------------------------
00151 typedef PairIter< std::vector<Relation>::const_iterator > PairIterRelation ;
00152 typedef std::vector<Relation> RelationVector;
00153 
00154 //----------------------------------------------------------------------
00155 
00156 
00157 } // namespace mesh
00158 } // namespace stk
00159 
00160 //----------------------------------------------------------------------
00161 
00162 namespace stk {
00163 namespace mesh {
00164 
00165 class UnitTestMetaData ;
00166 class UnitTestBulkData ;
00167 
00168 } // namespace mesh
00169 } // namespace stk
00170 
00171 #endif
00172 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends