Epetra Package Browser (Single Doxygen Collection) Development
Epetra_Comm.h
Go to the documentation of this file.
00001 /*
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright 2001 Sandia Corporation
00007 // 
00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009 // the U.S. Government retains certain rights in this software.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00039 // 
00040 // ************************************************************************
00041 //@HEADER
00042 */
00043 
00044 #ifndef EPETRA_COMM_H
00045 #define EPETRA_COMM_H
00046 
00047 #include "Epetra_ConfigDefs.h"
00048 #include "Epetra_Object.h"
00049 
00050 class Epetra_Distributor;
00051 class Epetra_Directory;
00052 class Epetra_BlockMap;
00053 
00055 
00073 class EPETRA_LIB_DLL_EXPORT Epetra_Comm {
00074     
00075   public:
00077 
00078 
00079 
00083   virtual Epetra_Comm * Clone() const = 0;
00085   virtual ~Epetra_Comm() {};
00087 
00089 
00090 
00091 
00093   virtual void Barrier() const = 0;
00095 
00097 
00098 
00099 
00110   virtual int Broadcast(double * MyVals, int Count, int Root) const = 0;
00111 
00113 
00124   virtual int Broadcast(int * MyVals, int Count, int Root) const = 0;
00125 
00127 
00138   virtual int Broadcast(long * MyVals, int Count, int Root) const = 0;
00139 
00141 
00152   virtual int Broadcast(char * MyVals, int Count, int Root) const = 0;
00153 
00155 
00157 
00158 
00159 
00169   virtual int GatherAll(double * MyVals, double * AllVals, int Count) const = 0;
00170 
00172 
00182   virtual int GatherAll(int * MyVals, int * AllVals, int Count) const = 0;
00183 
00185 
00195   virtual int GatherAll(long * MyVals, long * AllVals, int Count) const = 0;
00197 
00199 
00200 
00201 
00212   virtual int SumAll(double * PartialSums, double * GlobalSums, int Count) const = 0;
00213 
00215 
00225   virtual int SumAll(int * PartialSums, int * GlobalSums, int Count) const = 0;
00226 
00228 
00238   virtual int SumAll(long * PartialSums, long * GlobalSums, int Count) const = 0;
00240 
00242 
00243 
00244 
00254   virtual int MaxAll(double * PartialMaxs, double * GlobalMaxs, int Count) const = 0;
00255 
00257 
00267   virtual int MaxAll(int * PartialMaxs, int * GlobalMaxs, int Count) const = 0;
00268 
00270 
00280   virtual int MaxAll(long * PartialMaxs, long * GlobalMaxs, int Count) const = 0;
00281 
00283 
00293   virtual int MinAll(double * PartialMins, double * GlobalMins, int Count) const = 0;
00294 
00296 
00306   virtual int MinAll(int * PartialMins, int * GlobalMins, int Count) const = 0;
00307 
00309 
00319   virtual int MinAll(long * PartialMins, long * GlobalMins, int Count) const = 0;
00321 
00323 
00324 
00325 
00335   virtual int ScanSum(double * MyVals, double * ScanSums, int Count) const = 0;
00336 
00338 
00348   virtual int ScanSum(int * MyVals, int * ScanSums, int Count) const = 0;
00349 
00351 
00361   virtual int ScanSum(long * MyVals, long * ScanSums, int Count) const = 0;
00363 
00365 
00366     
00368 
00371   virtual int MyPID() const = 0;
00372   
00374 
00377   virtual int NumProc() const = 0;
00379 
00381 
00382 
00383   virtual Epetra_Distributor * CreateDistributor() const = 0;
00385   virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap & Map) const = 0;
00387 
00389 
00390 
00391   virtual void PrintInfo(ostream & os) const = 0;
00393 };
00394 #endif /* EPETRA_COMM_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines