Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_Distributor.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_DISTRIBUTOR_H
45 #define EPETRA_DISTRIBUTOR_H
46 
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
48 #ifdef __GNUC__
49 #warning "The Epetra package is deprecated"
50 #endif
51 #endif
52 
53 
54 
56 
68 #include "Epetra_Object.h"
70 
71  public:
73 
74  virtual Epetra_Distributor * Clone() = 0;
76 
78 
81  virtual Epetra_Distributor * ReverseClone() =0;
82 
84  virtual ~Epetra_Distributor(){};
85 
87 
88 
90 
91 
103  virtual int CreateFromSends( const int & NumExportIDs,
104  const int * ExportPIDs,
105  bool Deterministic,
106  int & NumRemoteIDs ) = 0;
107 
109 
124  virtual int CreateFromRecvs( const int & NumRemoteIDs,
125  const int * RemoteGIDs,
126  const int * RemotePIDs,
127  bool Deterministic,
128  int & NumExportIDs,
129  int *& ExportGIDs,
130  int *& ExportPIDs) = 0;
131 
132 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
133  virtual int CreateFromRecvs( const int & NumRemoteIDs,
134  const long long * RemoteGIDs,
135  const int * RemotePIDs,
136  bool Deterministic,
137  int & NumExportIDs,
138  long long *& ExportGIDs,
139  int *& ExportPIDs) = 0;
140 #endif
141 
142 
144 
145 
147  virtual int Do( char * export_objs,
148  int obj_size,
149  int & len_import_objs,
150  char *& import_objs) = 0;
151 
153  virtual int DoReverse( char * export_objs,
154  int obj_size,
155  int & len_import_objs,
156  char *& import_objs ) = 0;
157 
159  virtual int DoPosts( char * export_objs,
160  int obj_size,
161  int & len_import_objs,
162  char *& import_objs ) = 0;
163 
165  virtual int DoWaits() = 0;
166 
168  virtual int DoReversePosts( char * export_objs,
169  int obj_size,
170  int & len_import_objs,
171  char *& import_objs) = 0;
172 
174  virtual int DoReverseWaits() = 0;
176 
178 
179 
181  virtual int Do( char * export_objs,
182  int obj_size,
183  int *& sizes,
184  int & len_import_objs,
185  char *& import_objs) = 0;
186 
188  virtual int DoReverse( char * export_objs,
189  int obj_size,
190  int *& sizes,
191  int & len_import_objs,
192  char *& import_objs) = 0;
193 
195  virtual int DoPosts( char * export_objs,
196  int obj_size,
197  int *& sizes,
198  int & len_import_objs,
199  char *& import_objs) = 0;
200 
202  virtual int DoReversePosts( char * export_objs,
203  int obj_size,
204  int *& sizes,
205  int & len_import_objs,
206  char *& import_objs) = 0;
208 
210 
211  virtual void Print(std::ostream & os) const = 0;
213 };
214 #endif /* EPETRA_DISTRIBUTOR_H */
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int DoReverse(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Execute reverse of plan on buffer of export objects in a single step.
virtual void Print(std::ostream &os) const =0
virtual int CreateFromSends(const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)=0
Create Distributor object using list of process IDs to which we export.
virtual int DoReverseWaits()=0
Wait on a reverse set of posts.
virtual Epetra_Distributor * ReverseClone()=0
Create and extract the reverse version of the distributor.
virtual int DoWaits()=0
Wait on a set of posts.
virtual int Do(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Execute plan on buffer of export objects in a single step.
virtual int DoPosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Post buffer of export objects (can do other local work before executing Waits)
virtual ~Epetra_Distributor()
Epetra_Distributor Destructor.
virtual int DoReversePosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Do reverse post of buffer of export objects (can do other local work before executing Waits) ...
virtual int CreateFromRecvs(const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, int *&ExportGIDs, int *&ExportPIDs)=0
Create Distributor object using list of Remote global IDs and corresponding PIDs. ...
virtual Epetra_Distributor * Clone()=0
Epetra_Distributor clone constructor.