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<Bucket *> BucketVector;
00071 typedef std::vector<Entity *> EntityVector;
00072 
00076 enum EntityModificationLog { EntityLogNoChange = 0 ,
00077                              EntityLogCreated  = 1 ,
00078                              EntityLogModified = 2 ,
00079                              EntityLogDeleted  = 3 };
00080 
00081 template< class FieldType > struct EntityArray ;
00082 template< class FieldType > struct BucketArray ;
00083 template< class FieldType > struct FieldTraits ;
00084 
00085 
00086 typedef unsigned Ordinal;
00087 typedef Ordinal EntityRank ;
00088 typedef Ordinal PartOrdinal;
00089 typedef Ordinal FieldOrdinal;
00090 typedef Ordinal RelationIdentifier;
00091 typedef Ordinal FieldArrayRank;
00092 
00093 typedef uint64_t EntityId ;
00094 
00095 // Base Entity Rank
00096 // Note:  This BaseEntityRank can be considered the leaf of a tree and it
00097 // represents the furthest out you can go in downward relations.
00098 static const EntityRank BaseEntityRank = 0;
00099 static const EntityRank InvalidEntityRank = static_cast<EntityRank>(-1); // std::numeric_limits<EntityRank>::max();
00100 static const PartOrdinal InvalidPartOrdinal = static_cast<PartOrdinal>(-1); // std::numeric_limits<PartOrdinal>::max();
00101 static const RelationIdentifier InvalidRelationIdentifier = static_cast<RelationIdentifier>(-1); // std::numeric_limits<PartOrdinal>::max();
00102 
00103 //----------------------------------------------------------------------
00109 typedef std::pair<Entity*,unsigned> EntityProc ;
00110 typedef std::vector<EntityProc>     EntityProcVec ;
00111 
00115 typedef PairIter< std::vector< EntityProc >::const_iterator >
00116   PairIterEntityProc ;
00117 #ifndef SWIG
00118   //NLM SWIG cannot handle this macro
00119   
00120 NAMED_PAIR( EntityCommInfo , unsigned , ghost_id , unsigned , proc )
00121 
00122 
00125 typedef PairIter< std::vector< EntityCommInfo >::const_iterator >
00126   PairIterEntityComm ;
00127 
00128 typedef std::vector<EntityCommInfo> EntityCommInfoVector;
00129 #endif
00130 
00132 //----------------------------------------------------------------------
00147 typedef int ( * relation_stencil_ptr )( unsigned  from_type ,
00148                                         unsigned  to_type ,
00149                                         unsigned  identifier );
00150 
00151 //----------------------------------------------------------------------
00159 typedef PairIter< std::vector<Relation>::const_iterator > PairIterRelation ;
00160 typedef std::vector<Relation> RelationVector;
00161 
00162 //----------------------------------------------------------------------
00163 
00164 
00165 } // namespace mesh
00166 } // namespace stk
00167 
00168 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends