33 numCoefAccessPatterns_(0),
34 accessPatterns_(NULL),
45 numSharedNodeSets_(0),
46 sharedNodeSets_(NULL),
47 numFieldsRead_(false),
48 numElemBlocksRead_(false),
49 currentElemBlockIndex_(0),
112 char* keyword = NULL;
116 while (!instr->eof() && !err) {
133 if (err)
return(err);
135 char *temp =
new char[256];
136 for(
int i=0; i<256; i++) temp[i] =
'\0';
140 }
while ((std::strlen(temp) == 0) && (!instr->eof()));
142 keyword =
new char[std::strlen(temp)+1];
143 std::strcpy(keyword, temp);
153 if (i<1 || i>126)
return(0);
167 while(c ==
'#' || c ==
'\n' || c ==
' ') {
169 char* buf =
new char[128];
170 for(
int i=0; i<128; i++) buf[i] =
'\0';
171 instr->getline(buf, 128);
177 if (instr->eof())
return(1);
178 if ((
int)c == EOF)
return(1);
192 if (!std::strcmp(
"solveType", keyword)) {
197 if (!std::strcmp(
"parameters", keyword)) {
201 char** newParams =
new char*[
numParams_ + tmp];
204 for(
int i=numParams_; i<numParams_+tmp; i++) {
205 char* buf =
new char[256];
206 for(
int j=0; j<256; j++) buf[j] =
'\0';
209 instr->getline(buf, 128);
211 newParams[i] =
new char[std::strlen(buf)+2];
212 std::strcpy(newParams[i], buf);
224 if (!std::strcmp(
"numFields", keyword)) {
234 if (!std::strcmp(
"fieldIDs", keyword)) {
239 if (!std::strcmp(
"fieldSizes", keyword)) {
244 if (!std::strcmp(
"numElemBlocks", keyword)) {
260 if (!std::strcmp(
"blockID", keyword)) {
265 FEI_COUT <<
"DataReader: ERROR, numElemBlocks not read before blockID."
279 if (!std::strcmp(
"interleaveStrategy", keyword)) {
290 if (!std::strcmp(
"numElements", keyword)) {
305 if (!std::strcmp(
"numNodesPerElement", keyword)) {
322 if (!std::strcmp(
"numElemDOF", keyword)) {
335 if (!std::strcmp(
"elemDOFFieldIDs", keyword)) {
339 for(
int i=0; i<edof; i++) {
347 if (!std::strcmp(
"elemFormat", keyword)) {
356 if (!std::strcmp(
"numFieldsPerNode", keyword)) {
370 if (!std::strcmp(
"nodalFieldIDs", keyword)) {
373 int i, numStiffRows = 0;
389 eb9.
elemStiff_[i] =
new double*[numStiffRows];
390 eb9.
elemLoad_[i] =
new double[numStiffRows];
391 for(
int j=0; j<numStiffRows; j++) {
392 eb9.
elemStiff_[i][j] =
new double[numStiffRows];
399 if (!std::strcmp(
"elemID", keyword)) {
431 if (!std::strcmp(
"numSharedNodeSets", keyword)) {
449 for(j=0; j<nn; j++) {
457 for(j=0; j<nn; j++) {
463 shSet.
procs_ =
new int*[nn];
465 for(j=0; j<nn; j++) {
476 if (!std::strcmp(
"numBCNodeSets", keyword)) {
503 for(j=0; j<nn; j++) {
512 if (!std::strcmp(
"numCRMultSets", keyword)) {
552 for(
int k=0; k<size; k++) {
566 if (!std::strcmp(
"numCoefAccessPatterns", keyword)) {
627 if (!std::strcmp(
"coefAccess", keyword)) {
628 int i, patternID = -1;
670 for(i=0; i<len; i++) {
691 coefAcc.
coefs_ =
new double[len];
694 for(i=0; i<len; i++) {
702 if (!std::strcmp(
"numSlaveVariables", keyword)) {
740 for(
int k=0; k<size; k++) {
752 if (!std::strcmp(
"numCRPenSets", keyword)) {
792 for(
int k=0; k<size3; k++) {
820 fei::console_out() <<
"DataReader: ERROR, trying to find size of non-existent field."
double * prescribed_values_
static int is_reg_char(char c)
static int getKeyword(FEI_ISTREAM *instr, char *&keyword)
AccessPattern * accessPatterns_
static int skipWhite(FEI_ISTREAM *instr)
CommNodeSet * sharedNodeSets_
int currentElemBlockIndex_
int readData(const char *fileName)
int getFieldSize(int fieldID)
CoefAccess * coefAccesses_
std::ostream & console_out()
int numCoefAccessPatterns_