test/FEVector/cxx_main.cpp

Go to the documentation of this file.
00001 //@HEADER
00002 // ************************************************************************
00003 // 
00004 //               Epetra: 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 // Epetra_FEVector Test routine
00030 
00031 #include "Epetra_Time.h"
00032 #include "Epetra_BlockMap.h"
00033 #include "Epetra_FEVector.h"
00034 #include "ExecuteTestProblems.h"
00035 #include "../src/Epetra_test_functions.h"
00036 #include "Epetra_Comm.h"
00037 #include "../epetra_test_err.h"
00038 #include "Epetra_Version.h"
00039 
00040 int main(int argc, char *argv[]) {
00041 
00042   int ierr = 0;
00043 
00044   //epetra_test::create_comm initializes mpi if EPETRA_MPI is defined
00045   Epetra_Comm* epetra_comm = epetra_test::create_comm(argc, argv);
00046   Epetra_Comm& Comm = *epetra_comm;
00047 
00048   int NumProc = Comm.NumProc(); 
00049 
00050   bool verbose =
00051     epetra_test::global_check_for_flag_on_proc_0("-v",argc,argv, Comm);
00052 
00053   if (verbose) cout << Epetra_Version() << endl << endl;
00054 
00055   int NumVectors = 1;
00056   int NumMyElements = 4;
00057   int NumGlobalElements = NumMyElements*NumProc;
00058   int IndexBase = 0;
00059   int ElementSize = 1;
00060 
00061   Epetra_BlockMap BlockMap(NumGlobalElements, NumMyElements,
00062                            ElementSize, IndexBase, Comm);
00063   BlockMap.SetTracebackMode(0); // This should shut down any error tracing
00064 
00065   EPETRA_TEST_ERR(MultiVectorTests(BlockMap, NumVectors, verbose),ierr);
00066 
00067   Comm.Barrier();
00068   if (verbose)cout << endl;
00069   Comm.Barrier();
00070 
00071   EPETRA_TEST_ERR( fevec0(Comm, verbose), ierr);
00072 
00073   Comm.Barrier();
00074   if (verbose)cout << endl;
00075   Comm.Barrier();
00076 
00077   EPETRA_TEST_ERR( fevec1(Comm, verbose), ierr);
00078 
00079   Comm.Barrier();
00080   if (verbose)cout << endl;
00081   Comm.Barrier();
00082 
00083   EPETRA_TEST_ERR( fevec2(Comm, verbose), ierr);
00084 
00085   Comm.Barrier();
00086   if (verbose)cout << endl;
00087   Comm.Barrier();
00088 
00089   EPETRA_TEST_ERR( fevec3(Comm, verbose), ierr);
00090   delete epetra_comm;
00091 
00092 #ifdef EPETRA_MPI
00093   MPI_Finalize();
00094 #endif
00095  
00096   return ierr;
00097 }
00098 

Generated on Wed May 12 21:41:04 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7