Sierra Toolkit  Version of the Day
Ghosting.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 
10 #ifndef stk_mesh_Ghosting_hpp
11 #define stk_mesh_Ghosting_hpp
12 
13 #include <vector>
14 #include <string>
15 #include <iosfwd>
16 #include <stk_mesh/base/Types.hpp>
17 
18 namespace stk_classic {
19 namespace mesh {
20 
28 class Ghosting {
29 public:
30 
32  const std::string & name() const { return m_name ; }
33 
35  unsigned ordinal() const { return m_ordinal ; }
36 
40  size_t synchronized_count() const { return m_sync_count ; }
41 
47  void send_list( std::vector< EntityProc > & ) const ;
48 
54  void receive_list( std::vector< Entity * > & ) const ;
55 
58  std::ostream& operator<<(std::ostream& out) const;
59 
60 private:
65  BulkData & bulk_data() const { return m_mesh ; }
66  friend class BulkData ;
67 
68  BulkData & m_mesh ;
69  const std::string m_name ;
70  size_t m_sync_count ;
71  unsigned m_ordinal ;
72 
73  Ghosting( BulkData & M , const std::string & n , unsigned ord , size_t count )
74  : m_mesh( M ) , m_name( n ), m_sync_count( count ), m_ordinal( ord ) {}
75 
76  ~Ghosting() {}
77 
78  // None of the following are implemented:
79  Ghosting();
80  Ghosting( const Ghosting & );
81  Ghosting & operator = ( const Ghosting & );
82 };
83 
84 std::ostream& operator<<(std::ostream& out, const Ghosting& rhs);
85 
86 }
87 }
88 
89 #endif
90 
Data for ghosting mesh entities.
Definition: Ghosting.hpp:28
size_t synchronized_count() const
Bulk data synchronization count when this ghosting object was last modified.
Definition: Ghosting.hpp:40
std::ostream & operator<<(std::ostream &s, const Bucket &k)
Print the part names for which this bucket is a subset.
Definition: Bucket.cpp:239
void receive_list(std::vector< Entity * > &) const
Entities ghosted on this processor from the owner.
Definition: Ghosting.cpp:33
std::ostream & operator<<(std::ostream &out) const
Print the details of this object for debugging.
Definition: Ghosting.cpp:49
Manager for an integrated collection of entities, entity relations, and buckets of field data...
Definition: BulkData.hpp:49
Sierra Toolkit.
const std::string & name() const
Text name for printing purposes only.
Definition: Ghosting.hpp:32
unsigned ordinal() const
Ordinal to identify the ghosting subset.
Definition: Ghosting.hpp:35
void send_list(std::vector< EntityProc > &) const
Locally owned entities ghosted on other processors.
Definition: Ghosting.cpp:17