FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataReader.hpp
Go to the documentation of this file.
1 #ifndef _DataReader_h_
2 #define _DataReader_h_
3 
4 /*--------------------------------------------------------------------*/
5 /* Copyright 2005 Sandia Corporation. */
6 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
7 /* non-exclusive license for use of this work by or on behalf */
8 /* of the U.S. Government. Export of this program may require */
9 /* a license from the United States Government. */
10 /*--------------------------------------------------------------------*/
11 
12 #include <test_utils/BCNodeSet.hpp>
13 #include <test_utils/CRSet.hpp>
15 #include <test_utils/ElemBlock.hpp>
18 #include <fei_iostream.hpp>
19 #include <string>
20 
21 class DataReader {
22  public:
23  DataReader();
24  ~DataReader();
25 
26  int readData(const char* fileName);
27 
29 
30  std::string solverLibraryName_;
31  std::string solnFileName_;
32  std::string checkFileName_;
33 
35  int* fieldIDs_;
37 
39  char** paramStrings_;
40 
42  ElemBlock* elemBlocks_; //list of length numElemBlocks_
43 
46 
49 
52 
55 
58 
61 
64 
65  int getFieldSize(int fieldID);
66 
67  static int getKeyword(FEI_ISTREAM* instr, char*& keyword);
68  void readData(FEI_ISTREAM* instr, char* keyword);
69  static void readData(FEI_ISTREAM* instr, int& n);
70  static void readData(FEI_ISTREAM* instr, double& val);
71 
72  static int is_reg_char(char c);
73  static int skipWhite(FEI_ISTREAM* instr);
74 
75  private:
76  void deleteMemory();
77 
82 
86 };
87 
88 #endif
89 
Definition: CRSet.hpp:25
int * fieldIDs_
Definition: DataReader.hpp:35
CRSet * crPenSets_
Definition: DataReader.hpp:57
int * fieldSizes_
Definition: DataReader.hpp:36
CRSet * slaveVars_
Definition: DataReader.hpp:54
static int is_reg_char(char c)
Definition: DataReader.cpp:151
std::string solverLibraryName_
Definition: DataReader.hpp:30
int numSlaveVars_
Definition: DataReader.hpp:53
int numFields_
Definition: DataReader.hpp:34
bool numElemBlocksRead_
Definition: DataReader.hpp:79
int numCRPenSets_
Definition: DataReader.hpp:56
static int getKeyword(FEI_ISTREAM *instr, char *&keyword)
Definition: DataReader.cpp:131
int numBCNodeSets_
Definition: DataReader.hpp:59
int numElemBlocks_
Definition: DataReader.hpp:41
AccessPattern * accessPatterns_
Definition: DataReader.hpp:45
static int skipWhite(FEI_ISTREAM *instr)
Definition: DataReader.cpp:159
bool numFieldsRead_
Definition: DataReader.hpp:78
int solveType_
Definition: DataReader.hpp:28
int numSharedNodeSets_
Definition: DataReader.hpp:62
CommNodeSet * sharedNodeSets_
Definition: DataReader.hpp:63
std::string checkFileName_
Definition: DataReader.hpp:32
char ** paramStrings_
Definition: DataReader.hpp:39
void deleteMemory()
Definition: DataReader.cpp:66
int currentElemBlockIndex_
Definition: DataReader.hpp:80
int readData(const char *fileName)
Definition: DataReader.cpp:103
int getFieldSize(int fieldID)
Definition: DataReader.cpp:815
CoefAccess * coefAccesses_
Definition: DataReader.hpp:48
std::string solnFileName_
Definition: DataReader.hpp:31
int currentBCIndex_
Definition: DataReader.hpp:85
int numCRMultSets_
Definition: DataReader.hpp:50
int currentExtIndex_
Definition: DataReader.hpp:84
#define FEI_ISTREAM
int currentElemIndex_
Definition: DataReader.hpp:81
int numCoefAccessPatterns_
Definition: DataReader.hpp:44
int numParams_
Definition: DataReader.hpp:38
ElemBlock * elemBlocks_
Definition: DataReader.hpp:42
CRSet * crMultSets_
Definition: DataReader.hpp:51
int currentShIndex_
Definition: DataReader.hpp:83
BCNodeSet * bcNodeSets_
Definition: DataReader.hpp:60
int numCoefAccesses_
Definition: DataReader.hpp:47