Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_Comm.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_COMM_H
45 #define EPETRA_COMM_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 
55 #include "Epetra_ConfigDefs.h"
56 #include "Epetra_Object.h"
57 
58 class Epetra_Distributor;
59 class Epetra_Directory;
60 class Epetra_BlockMap;
61 
63 
81 class EPETRA_LIB_DLL_EXPORT Epetra_Comm {
82 
83  public:
85 
86 
91  virtual Epetra_Comm * Clone() const = 0;
93  virtual ~Epetra_Comm() {};
95 
97 
98 
101  virtual void Barrier() const = 0;
103 
105 
106 
118  virtual int Broadcast(double * MyVals, int Count, int Root) const = 0;
119 
121 
132  virtual int Broadcast(int * MyVals, int Count, int Root) const = 0;
133 
135 
146  virtual int Broadcast(long * MyVals, int Count, int Root) const = 0;
147 
149 
160  virtual int Broadcast(long long * MyVals, int Count, int Root) const = 0;
161 
163 
174  virtual int Broadcast(char * MyVals, int Count, int Root) const = 0;
175 
177 
179 
180 
191  virtual int GatherAll(double * MyVals, double * AllVals, int Count) const = 0;
192 
194 
204  virtual int GatherAll(int * MyVals, int * AllVals, int Count) const = 0;
205 
207 
217  virtual int GatherAll(long * MyVals, long * AllVals, int Count) const = 0;
218 
220 
230  virtual int GatherAll(long long * MyVals, long long * AllVals, int Count) const = 0;
232 
234 
235 
247  virtual int SumAll(double * PartialSums, double * GlobalSums, int Count) const = 0;
248 
250 
260  virtual int SumAll(int * PartialSums, int * GlobalSums, int Count) const = 0;
261 
263 
273  virtual int SumAll(long * PartialSums, long * GlobalSums, int Count) const = 0;
274 
276 
286  virtual int SumAll(long long * PartialSums, long long * GlobalSums, int Count) const = 0;
288 
290 
291 
302  virtual int MaxAll(double * PartialMaxs, double * GlobalMaxs, int Count) const = 0;
303 
305 
315  virtual int MaxAll(int * PartialMaxs, int * GlobalMaxs, int Count) const = 0;
316 
318 
328  virtual int MaxAll(long * PartialMaxs, long * GlobalMaxs, int Count) const = 0;
329 
331 
341  virtual int MaxAll(long long * PartialMaxs, long long * GlobalMaxs, int Count) const = 0;
342 
344 
354  virtual int MinAll(double * PartialMins, double * GlobalMins, int Count) const = 0;
355 
357 
367  virtual int MinAll(int * PartialMins, int * GlobalMins, int Count) const = 0;
368 
370 
380  virtual int MinAll(long * PartialMins, long * GlobalMins, int Count) const = 0;
381 
392  virtual int MinAll(long long * PartialMins, long long * GlobalMins, int Count) const = 0;
394 
396 
397 
408  virtual int ScanSum(double * MyVals, double * ScanSums, int Count) const = 0;
409 
411 
421  virtual int ScanSum(int * MyVals, int * ScanSums, int Count) const = 0;
422 
424 
434  virtual int ScanSum(long * MyVals, long * ScanSums, int Count) const = 0;
435 
437 
447  virtual int ScanSum(long long * MyVals, long long * ScanSums, int Count) const = 0;
449 
451 
452 
454 
457  virtual int MyPID() const = 0;
458 
460 
463  virtual int NumProc() const = 0;
465 
467 
468  virtual Epetra_Distributor * CreateDistributor() const = 0;
471 // CreateDirectory is defined in Winbase.h as a macro!
472 #ifdef CreateDirectory
473 #undef CreateDirectory
474 #endif
475  virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap & Map) const = 0;
477 
479 
480  virtual void PrintInfo(std::ostream & os) const = 0;
483 };
484 #endif /* EPETRA_COMM_H */
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:81
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
virtual ~Epetra_Comm()
Epetra_Comm Destructor.
Definition: Epetra_Comm.h:93