|
Sierra Toolkit Version of the Day
|
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_EntityComm_hpp 00010 #define stk_mesh_EntityComm_hpp 00011 00012 //---------------------------------------------------------------------- 00013 00014 #include <iosfwd> 00015 #include <vector> 00016 00017 #include <stk_util/parallel/ParallelComm.hpp> 00018 #include <stk_mesh/base/Types.hpp> 00019 00020 //---------------------------------------------------------------------- 00021 00022 namespace stk { 00023 namespace mesh { 00024 00026 bool in_shared( const Entity & entity ); 00027 00029 bool in_shared( const Entity & entity , unsigned proc ); 00030 00032 bool in_receive_ghost( const Entity & entity ); 00033 00035 bool in_receive_ghost( const Ghosting & ghost , const Entity & entity ); 00036 00038 bool in_send_ghost( const Entity & entity ); 00039 00041 bool in_send_ghost( const Entity & entity , unsigned proc ); 00042 00044 bool in_ghost( const Ghosting & ghost , const Entity & entity , unsigned p ); 00045 00049 bool in_owned_closure( const Entity & entity , unsigned proc ); 00050 00052 void comm_procs( const Entity & entity , std::vector<unsigned> & procs ); 00053 00055 void comm_procs( const Ghosting & ghost , 00056 const Entity & entity , std::vector<unsigned> & procs ); 00057 00058 00059 //---------------------------------------------------------------------- 00060 00061 void pack_entity_info( CommBuffer & buf , const Entity & entity ); 00062 00063 void unpack_entity_info( 00064 CommBuffer & buf, 00065 const BulkData & mesh , 00066 EntityKey & key , 00067 unsigned & owner , 00068 PartVector & parts , 00069 std::vector<Relation> & relations ); 00070 00071 00073 void pack_field_values( CommBuffer & , Entity & ); 00074 00076 bool unpack_field_values( CommBuffer & , Entity & , std::ostream & error_msg ); 00077 00078 } // namespace mesh 00079 } // namespace stk 00080 00081 //---------------------------------------------------------------------- 00082 //---------------------------------------------------------------------- 00083 00084 #endif 00085