EpetraExt Package Browser (Single Doxygen Collection) Development
test/SingletonFilter/cxx_main.cpp
Go to the documentation of this file.
00001 //@HEADER
00002 // ***********************************************************************
00003 // 
00004 //     EpetraExt: Epetra Extended - Linear Algebra Services Package
00005 //                 Copyright (2001) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 //@HEADER
00028 
00029 //SingletonFilter Test routine
00030 #include <Epetra_ConfigDefs.h>
00031 #include "EpetraExt_Version.h"
00032 
00033 #ifdef EPETRA_MPI
00034 #include "Epetra_MpiComm.h"
00035 #include <mpi.h>
00036 #endif
00037 #include "Epetra_SerialComm.h"
00038 #include "Epetra_Time.h"
00039 #include "Epetra_BlockMap.h"
00040 #include "Epetra_CrsGraph.h"
00041 #include "Epetra_CrsMatrix.h"
00042 #include "Epetra_Vector.h"
00043 
00044 #include "EpetraExt_CrsSingletonFilter_LinearProblem.h"
00045 #include "../epetra_test_err.h"
00046 
00047 int main(int argc, char *argv[]) {
00048 
00049 #ifdef EPETRA_MPI
00050 
00051   // Initialize MPI
00052 
00053   MPI_Init(&argc,&argv);
00054   //int size, rank; // Number of MPI processes, My process ID
00055 
00056   //MPI_Comm_size(MPI_COMM_WORLD, &size);
00057   //MPI_Comm_rank(MPI_COMM_WORLD, &rank);
00058 
00059 #else
00060 
00061   //int size = 1; // Serial case (not using MPI)
00062   //int rank = 0;
00063 
00064 #endif
00065 
00066   bool verbose = false;
00067 
00068   // Check if we should print results to standard out
00069   if (argc>1) if (argv[1][0]=='-' && argv[1][1]=='v') verbose = true;
00070 
00071 
00072 #ifdef EPETRA_MPI
00073   Epetra_MpiComm Comm(MPI_COMM_WORLD);
00074 #else
00075   Epetra_SerialComm Comm;
00076 #endif
00077   if (!verbose) Comm.SetTracebackMode(0); // This should shut down any error traceback reporting
00078 
00079   int MyPID = Comm.MyPID();
00080   //int NumProc = Comm.NumProc();
00081 
00082   bool verbose1 = verbose;
00083 
00084   if (verbose) verbose = (MyPID==0);
00085 
00086   if (verbose)
00087     cout << EpetraExt::EpetraExt_Version() << endl << endl;
00088 
00089   Comm.Barrier();
00090 
00091   if (verbose1) cout << Comm << endl << flush;
00092                                                                                 
00093   Comm.Barrier();
00094 
00095   //int NumMyElements = 10000;
00096   //int NumGlobalElements = NumMyElements*NumProc+EPETRA_MIN(NumProc,3);
00097   //if (MyPID < 3) NumMyElements++;
00098   //int IndexBase = 0;
00099   //int ElementSize = 7;
00100   //bool DistributedGlobal = (NumGlobalElements>NumMyElements);
00101   
00102   //Epetra_BlockMap * Map;
00103 
00104   cout << "NOT IMPLEMENTED YET!!!\n";
00105 
00106 #ifdef EPETRA_MPI
00107   MPI_Finalize();
00108 #endif
00109 
00110   return 0;
00111 }
00112 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines