FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FEI_tester.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _FEI_tester_h_
10 #define _FEI_tester_h_
11 
12 #include <fei_macros.hpp>
13 #include <fei_SharedPtr.hpp>
14 #include <fei_defs.h>
15 
16 class LibraryWrapper;
17 class LinearSystemCore;
18 class FiniteElementData;
19 
20 #include <test_utils/feitester.hpp>
21 #include <test_utils/DataReader.hpp>
22 
23 #include <FEI_Implementation.hpp>
24 
25 class FEI_tester : public feitester {
26  public:
27  FEI_tester(fei::SharedPtr<DataReader> data_reader,
28  MPI_Comm comm, int localProc, int numProcs, bool useNewFEI=false);
29  ~FEI_tester();
30 
31  const char* getName()
32  {
33  static const char name[] = "FEI_tester";
34  return((const char*)name);
35  }
36 
37  int testInitialization();
38 
39  int testLoading();
40 
41  int testSolve();
42 
43  int testCheckResult();
44 
45  void dumpMatrixFiles();
46 
47  void setParameter(const char* param);
48 
49  private:
50  int createFEIinstance(const char* solverName);
51  int setIDlists();
52  int initializationPhase();
53  int normalLoadPhase();
54  int aggregateLoadPhase();
55  int exerciseResidualNorm();
56  int exercisePutFunctions();
57 
58  int save_block_node_soln(DataReader& data, FEI& fei,
59  const char* solnFileName, int numProcs,
60  int localProc, int solveCounter);
61 
62  int save_block_elem_soln(DataReader& data, FEI& fei,
63  const char* solnFileName,
64  int numProcs, int localProc, int solveCounter);
65 
66  int save_multiplier_soln(DataReader& data, FEI& fei,
67  const char* solnFileName,
68  int numProcs, int localProc, int solveCounter);
69 
70  int checkSolution(int localProc, int numProcs,
71  const char* solnFileName, const char* checkFileName,
72  const char* extension, int solveCounter);
73 
74  int lsc_matrix_check();
75 
76  MPI_Comm comm_;
77 
79 
81 
83 
84  int localProc_, numProcs_;
85 
86  int numMatrices;
87  int* matrixIDs;
88  int numRHSs;
89  int* rhsIDs;
90  bool useNewFEI_;
91 };
92 
93 #endif // _FEI_tester_h_
Definition: FEI.hpp:144
virtual const char * getName()=0