Sierra Toolkit Version of the Day
Entity.cpp
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 #include <stddef.h>
00010 #include <stdexcept>
00011 #include <iostream>
00012 #include <sstream>
00013 #include <algorithm>
00014 
00015 #include <stk_mesh/base/Entity.hpp>
00016 #include <stk_mesh/base/BulkData.hpp>
00017 #include <stk_mesh/base/MetaData.hpp>
00018 
00019 namespace stk {
00020 namespace mesh {
00021 
00022 //----------------------------------------------------------------------
00023 
00024 std::ostream &
00025 print_entity_key( std::ostream & os , const MetaData & meta_data ,
00026                   unsigned type , EntityId id )
00027 {
00028   const std::string & name = meta_data.entity_rank_name( type );
00029   return os << name << "[" << id << "]" ;
00030 }
00031 
00032 std::ostream &
00033 print_entity_key( std::ostream & os , const MetaData & meta_data ,
00034                   const EntityKey & key )
00035 {
00036   const unsigned type   = entity_rank(key);
00037   const EntityId id = entity_id(key);
00038   return print_entity_key( os , meta_data , type , id );
00039 }
00040 
00041 //----------------------------------------------------------------------
00042 
00043 Entity::Entity( const EntityKey & arg_key )
00044   : m_entityImpl( arg_key )
00045 {}
00046 
00047 
00048 Entity::~Entity()
00049 {}
00050 
00051 //
00052 //----------------------------------------------------------------------
00053 
00054 } // namespace mesh
00055 } // namespace stk
00056 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends