FEI_tester.hpp

00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _FEI_tester_h_
00010 #define _FEI_tester_h_
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_SharedPtr.hpp>
00014 #include <fei_defs.h>
00015 
00016 class LibraryWrapper;
00017 class LinearSystemCore;
00018 class FiniteElementData;
00019 
00020 #include <test_utils/feitester.hpp>
00021 #include <test_utils/DataReader.hpp>
00022 
00023 #include <FEI_Implementation.hpp>
00024 
00025 class FEI_tester : public feitester {
00026  public:
00027   FEI_tester(fei::SharedPtr<DataReader> data_reader,
00028        MPI_Comm comm, int localProc, int numProcs, bool useNewFEI=false);
00029   ~FEI_tester();
00030 
00031   const char* getName()
00032     {
00033       static const char name[] = "FEI_tester";
00034       return((const char*)name);
00035     }
00036 
00037   int testInitialization();
00038 
00039   int testLoading();
00040 
00041   int testSolve();
00042 
00043   int testCheckResult();
00044 
00045   void dumpMatrixFiles();
00046 
00047   void setParameter(const char* param);
00048 
00049  private:
00050   int createFEIinstance(const char* solverName);
00051   int setIDlists();
00052   int initializationPhase();
00053   int normalLoadPhase();
00054   int aggregateLoadPhase();
00055   int exerciseResidualNorm();
00056   int exercisePutFunctions();
00057 
00058   int save_block_node_soln(DataReader& data, FEI& fei,
00059          const char* solnFileName, int numProcs,
00060          int localProc, int solveCounter);
00061 
00062   int save_block_elem_soln(DataReader& data, FEI& fei,
00063          const char* solnFileName,
00064          int numProcs, int localProc, int solveCounter);
00065 
00066   int save_multiplier_soln(DataReader& data, FEI& fei,
00067          const char* solnFileName,
00068          int numProcs, int localProc, int solveCounter);
00069 
00070   int checkSolution(int localProc, int numProcs,
00071       const char* solnFileName, const char* checkFileName,
00072       const char* extension, int solveCounter);
00073 
00074   int lsc_matrix_check();
00075 
00076   MPI_Comm comm_;
00077 
00078   fei::SharedPtr<FEI> fei_;
00079 
00080   fei::SharedPtr<LibraryWrapper> wrapper_;
00081 
00082   fei::SharedPtr<DataReader> data_;
00083 
00084   int localProc_, numProcs_;
00085 
00086   int numMatrices;
00087   int* matrixIDs;
00088   int numRHSs;
00089   int* rhsIDs;
00090   bool useNewFEI_;
00091 };
00092 
00093 #endif // _FEI_tester_h_

Generated on Tue Jul 13 09:27:46 2010 for FEI by  doxygen 1.4.7