FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
driverData.hpp
Go to the documentation of this file.
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 _driverData_h_
10 #define _driverData_h_
11 
12 #include <fei_macros.hpp>
13 #include <fei_defs.h>
14 
15 class initElem {
16  public:
19  {
20  delete [] nodeIDs;
21  }
24  int numNodes;
26 };
27 
28 class sumInElem {
29  public:
30  sumInElem() : stiff1D(NULL), stiffness(NULL), load(NULL) {}
32  {
33  delete [] nodeIDs;
34  delete [] stiff1D;
35  delete [] stiffness;
36  delete [] load;
37  }
40  int numNodes;
42  int numRows;
43  double* stiff1D;
44  double** stiffness;
45  double* load;
47 };
48 
49 class nodeBC {
50  public:
51  nodeBC():nodeIDs(NULL), alpha(NULL), beta(NULL), gamma(NULL) {}
53  {
54  for(int i=0; i<numNodes; ++i) {
55  delete [] alpha[i];
56  delete [] beta[i];
57  delete [] gamma[i];
58  }
59  delete [] alpha;
60  delete [] beta;
61  delete [] gamma;
62  delete [] nodeIDs;
63  }
64  int numNodes;
66  int fieldID;
67  int fieldSize;
68  double** alpha;
69  double** beta;
70  double** gamma;
71 };
72 
73 class initCR {
74  public:
75  initCR(){}
77  {
78  delete [] nodeIDs;
79  delete [] fieldIDs;
80  }
81 
82  int numNodes;
84  int* fieldIDs;
85  int CRID;
86 };
87 
88 class loadCR {
89  public:
90  loadCR() {}
92  {
93  delete [] fieldIDs;
94  delete [] fieldSizes;
95  delete [] weights;
96  delete [] nodeIDs;
97  }
98 
99  int numNodes;
101  int* fieldIDs;
103  double* weights;
104  double CRValue;
105  double penValue;
106  int CRID;
107 };
108 
109 class sharedNodes {
110  public:
113  {
114  for(int i=0; i<numNodes; ++i) delete [] sharedProcIDs[i];
115  delete [] sharedProcIDs;
116  delete [] numProcsPerNode;
117  delete [] nodeIDs;
118  }
119 
120  int numNodes;
124 };
125 
126 class parameters {
127  public:
130  {
131  for(size_t i=0; i<paramList.size(); ++i) delete [] paramList[i];
132  }
133 
134  std::vector<char*> paramList;
135 };
136 
137 class setIDLists {
138  public:
139  setIDLists() : matrixIDs(NULL), rhsIDs(NULL) {}
140  ~setIDLists(){delete [] matrixIDs; delete [] rhsIDs;}
141 
142  int* matrixIDs;
144  int* rhsIDs;
145  int numRHSs;
146 };
147 
149  public:
152 
154  int fieldID;
156  int numNodes;
158  double* estimates;
159 };
160 
161 class driverData {
162  public:
163  driverData();
164  ~driverData();
165 
166  int readData(const char* fileName);
167 
172  int call_fei_method(const char* method, FEI* fei);
173 
174  std::vector<const char*>& get_methodNames() { return( methodNames ); }
175 
176  private:
177  int readData(FEI_ISTREAM* instr, char* keyword);
178  int getKeyword(FEI_ISTREAM* instr, char*& keyword);
179 
180  int is_reg_char(char c);
181  int skipWhite(FEI_ISTREAM* instr);
182  int readData(FEI_ISTREAM* instr, int& n);
183  int readData(FEI_ISTREAM* instr, double& val);
184  int appendName(const char* name);
185 
186  std::vector<const char*> methodNames;
187  char* temp_;
188  int tempLen_;
189 
191 
195 
201 
202  std::vector<initElem*> initElems_;
204 
205  std::vector<sumInElem*> sumInElems_;
207 
208  std::vector<sumInElem*> sumInElemMatrix_;
210 
211  std::vector<sumInElem*> sumInElemRHS_;
213 
214  double resetSystem_;
215  double resetMatrix_;
218 
219  std::vector<nodeBC*> loadNodeBCs_;
221 
222  std::vector<initCR*> initCRMult_;
224 
225  std::vector<loadCR*> loadCRMult_;
227 
228  std::vector<sharedNodes*> initSharedNodes_;
230 
231  std::vector<parameters*> parameters_;
233 
234  std::vector<setIDLists*> setIDLists_;
236 
237  std::vector<int> setCurrentMatrix_;
239 
240  std::vector<int> setCurrentRHS_;
242 
243  std::vector<putBlockFieldNodeSolution*> putBlockFieldNodeSolution_;
245 };
246 
247 #endif // _driverData_h_
int initFields_numFields_
Definition: driverData.hpp:192
int sumInElemCounter_
Definition: driverData.hpp:206
int * numProcsPerNode
Definition: driverData.hpp:122
GlobalID * nodeIDs
Definition: driverData.hpp:41
int initElemCounter_
Definition: driverData.hpp:203
double resetSystem_
Definition: driverData.hpp:214
double CRValue
Definition: driverData.hpp:104
double * stiff1D
Definition: driverData.hpp:43
std::vector< sumInElem * > sumInElems_
Definition: driverData.hpp:205
int sumInElemMatrixCounter_
Definition: driverData.hpp:209
int numNodes
Definition: driverData.hpp:64
double ** gamma
Definition: driverData.hpp:70
double * load
Definition: driverData.hpp:45
int GlobalID
Definition: fei_defs.h:60
std::vector< sumInElem * > sumInElemMatrix_
Definition: driverData.hpp:208
int * matrixIDs
Definition: driverData.hpp:142
int * initElemBlock_ints_
Definition: driverData.hpp:197
int is_reg_char(char c)
Definition: driverData.cpp:826
int * fieldSizes
Definition: driverData.hpp:102
int setCurrentRHSCounter_
Definition: driverData.hpp:241
std::vector< putBlockFieldNodeSolution * > putBlockFieldNodeSolution_
Definition: driverData.hpp:243
int * rhsIDs
Definition: driverData.hpp:144
int * initFields_fieldIDs_
Definition: driverData.hpp:194
std::vector< char * > paramList
Definition: driverData.hpp:134
int fieldID
Definition: driverData.hpp:66
GlobalID * nodeIDs
Definition: driverData.hpp:100
int * fieldIDs
Definition: driverData.hpp:84
int call_fei_method(const char *method, FEI *fei)
Definition: driverData.cpp:134
GlobalID * nodeIDs
Definition: driverData.hpp:65
std::vector< int > setCurrentRHS_
Definition: driverData.hpp:240
std::vector< sharedNodes * > initSharedNodes_
Definition: driverData.hpp:228
int sumInElemRHSCounter_
Definition: driverData.hpp:212
int initCRMultCounter_
Definition: driverData.hpp:223
char * temp_
Definition: driverData.hpp:187
double resetInitialGuess_
Definition: driverData.hpp:217
int skipWhite(FEI_ISTREAM *instr)
Definition: driverData.cpp:834
int * initElemBlock_elemDofFieldIDs_
Definition: driverData.hpp:200
int CRID
Definition: driverData.hpp:106
int * fieldIDs
Definition: driverData.hpp:101
int initElemBlock_numInts_
Definition: driverData.hpp:196
int putBlockFieldNodeSolutionCounter_
Definition: driverData.hpp:244
Definition: FEI.hpp:144
double * weights
Definition: driverData.hpp:103
int fieldSize
Definition: driverData.hpp:67
GlobalID elemID
Definition: driverData.hpp:23
int parametersCounter_
Definition: driverData.hpp:232
double ** alpha
Definition: driverData.hpp:68
int getKeyword(FEI_ISTREAM *instr, char *&keyword)
Definition: driverData.cpp:801
double resetMatrix_
Definition: driverData.hpp:215
double penValue
Definition: driverData.hpp:105
GlobalID * nodeIDs
Definition: driverData.hpp:25
int initSharedNodesCounter_
Definition: driverData.hpp:229
std::vector< parameters * > parameters_
Definition: driverData.hpp:231
std::vector< initElem * > initElems_
Definition: driverData.hpp:202
std::vector< int > setCurrentMatrix_
Definition: driverData.hpp:237
int numNodes
Definition: driverData.hpp:82
int CRID
Definition: driverData.hpp:85
int numNodes
Definition: driverData.hpp:40
int numNodes
Definition: driverData.hpp:99
double ** stiffness
Definition: driverData.hpp:44
GlobalID * nodeIDs
Definition: driverData.hpp:121
int * initFields_fieldSizes_
Definition: driverData.hpp:193
int setCurrentMatrixCounter_
Definition: driverData.hpp:238
GlobalID * nodeIDs
Definition: driverData.hpp:83
GlobalID elemBlockID
Definition: driverData.hpp:38
std::vector< loadCR * > loadCRMult_
Definition: driverData.hpp:225
int readData(const char *fileName)
Definition: driverData.cpp:105
int loadCRMultCounter_
Definition: driverData.hpp:226
std::vector< const char * > methodNames
Definition: driverData.hpp:186
int numNodes
Definition: driverData.hpp:24
int elemFormat
Definition: driverData.hpp:46
int * initElemBlock_fieldsPerNode_
Definition: driverData.hpp:198
int ** sharedProcIDs
Definition: driverData.hpp:123
double resetRHSVector_
Definition: driverData.hpp:216
int loadNodeBCsCounter_
Definition: driverData.hpp:220
double ** beta
Definition: driverData.hpp:69
#define FEI_ISTREAM
std::vector< const char * > & get_methodNames()
Definition: driverData.hpp:174
int appendName(const char *name)
Definition: driverData.cpp:792
int setIDListsCounter_
Definition: driverData.hpp:235
GlobalID elemID
Definition: driverData.hpp:39
std::vector< setIDLists * > setIDLists_
Definition: driverData.hpp:234
std::vector< nodeBC * > loadNodeBCs_
Definition: driverData.hpp:219
std::vector< sumInElem * > sumInElemRHS_
Definition: driverData.hpp:211
GlobalID elemBlockID
Definition: driverData.hpp:22
std::vector< initCR * > initCRMult_
Definition: driverData.hpp:222
int ** initElemBlock_fieldIDs_
Definition: driverData.hpp:199