Sierra Toolkit  Version of the Day
diag/EntityKey.hpp
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2010 Sandia Corporation. */
3 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */
4 /* license for use of this work by or on behalf of the U.S. Government. */
5 /* Export of this program may require a license from the */
6 /* United States Government. */
7 /*------------------------------------------------------------------------*/
8 
9 #ifndef stk_mesh_diag_EntityKey_hpp
10 #define stk_mesh_diag_EntityKey_hpp
11 
12 #include <stk_util/diag/Writer.hpp>
13 #include <stk_mesh/base/EntityKey.hpp>
14 
15 
16 namespace stk_classic {
17 namespace mesh {
18 
19 inline
20 stk_classic::diag::Writer &operator<<(stk_classic::diag::Writer &dout, const EntityKey &entity_key) {
21  return dout << entity_rank(entity_key) << ":" << entity_id(entity_key);
22 }
23 
24 } // namespace stk_classic
25 } // namespace mesh
26 
27 #endif // stk_mesh_diag_EntityKey_hpp
std::ostream & dout()
Diagnostic output stream.
Definition: OutputLog.cpp:674
std::ostream & operator<<(std::ostream &s, const Bucket &k)
Print the part names for which this bucket is a subset.
Definition: Bucket.cpp:239
EntityId entity_id(const EntityKey &key)
Given an entity key, return the identifier for the entity.
Sierra Toolkit.
Class Writer implements a runtime selectable diagnostic output writer to aid in the development and d...
Definition: Writer.hpp:49
EntityRank entity_rank(const EntityKey &key)
Given an entity key, return an entity type (rank).