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 typedef std::vector< unsigned > OrdinalVector ;
00038 
00039 class FieldBase;
00040 
00041 template< typename Scalar = void ,
00042           class Tag1 = void , class Tag2 = void ,
00043           class Tag3 = void , class Tag4 = void ,
00044           class Tag5 = void , class Tag6 = void ,
00045           class Tag7 = void >
00046   class Field ;
00047 
00052 enum { MaximumFieldDimension = 7 };
00053 
00054 template< typename DataType = void > class Property ;
00055 
00056 typedef Property< void > PropertyBase ;
00057 
00060 //----------------------------------------------------------------------
00065 class BulkData ; // Bulk-data of a mesh
00066 class Bucket ;   // Homogeneous collection of mesh entitities their field data
00067 class Entity ;   // Individual entity within the mesh
00068 class Relation ; // Relation pair of local mesh entities
00069 class Ghosting ;
00070 
00071 typedef std::vector<Bucket *> BucketVector;
00072 typedef std::vector<Entity *> EntityVector;
00073 
00077 enum EntityModificationLog { EntityLogNoChange = 0 ,
00078                              EntityLogCreated  = 1 ,
00079                              EntityLogModified = 2 ,
00080                              EntityLogDeleted  = 3 };
00081 
00082 template< class FieldType > struct EntityArray ;
00083 template< class FieldType > struct BucketArray ;
00084 template< class FieldType > struct FieldTraits ;
00085 
00086 
00087 typedef unsigned Ordinal;
00088 static const Ordinal InvalidOrdinal = static_cast<Ordinal>(-1); // std::numeric_limits<PartOrdinal>::max();
00089 typedef Ordinal EntityRank ;
00090 typedef Ordinal PartOrdinal;
00091 typedef Ordinal FieldOrdinal;
00092 typedef Ordinal RelationIdentifier;
00093 typedef Ordinal FieldArrayRank;
00094 
00095 typedef uint64_t EntityId ;
00096 
00097 // Base Entity Rank
00098 // Note:  This BaseEntityRank can be considered the leaf of a tree and it
00099 // represents the furthest out you can go in downward relations.
00100 static const EntityRank BaseEntityRank = 0;
00101 static const EntityRank InvalidEntityRank = InvalidOrdinal;
00102 static const PartOrdinal InvalidPartOrdinal = InvalidOrdinal;
00103 static const RelationIdentifier InvalidRelationIdentifier = InvalidOrdinal;
00104 
00105 //----------------------------------------------------------------------
00111 typedef std::pair<Entity*,unsigned> EntityProc ;
00112 typedef std::vector<EntityProc>     EntityProcVec ;
00113 
00117 typedef PairIter< std::vector< EntityProc >::const_iterator >
00118   PairIterEntityProc ;
00119 #ifndef SWIG
00120   //NLM SWIG cannot handle this macro
00121 
00122 NAMED_PAIR( EntityCommInfo , unsigned , ghost_id , unsigned , proc )
00123 
00124 
00127 typedef PairIter< std::vector< EntityCommInfo >::const_iterator >
00128   PairIterEntityComm ;
00129 
00130 typedef std::vector<EntityCommInfo> EntityCommInfoVector;
00131 #endif
00132 
00134 //----------------------------------------------------------------------
00149 typedef int ( * relation_stencil_ptr )( unsigned  from_type ,
00150                                         unsigned  to_type ,
00151                                         unsigned  identifier );
00152 
00153 //----------------------------------------------------------------------
00161 typedef std::vector<Relation> RelationVector;
00162 typedef PairIter< RelationVector::const_iterator > PairIterRelation ;
00163 
00164 //----------------------------------------------------------------------
00165 
00166 
00167 } // namespace mesh
00168 } // namespace stk
00169 
00170 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines