84 |
|
|
85 |
|
void DumpReader::scanFile( void ){ |
86 |
|
|
87 |
< |
int vectorSize; |
88 |
< |
int i, j, k; |
87 |
> |
int i, j; |
88 |
|
int lineNum = 0; |
89 |
|
char readBuffer[2000]; |
91 |
– |
char* foo; |
90 |
|
fpos_t *currPos; |
93 |
– |
double time; |
91 |
|
|
95 |
– |
|
96 |
– |
|
92 |
|
#ifdef IS_MPI |
93 |
|
if( worldRank == 0 ){ |
94 |
|
#endif // is_mpi |
171 |
|
|
172 |
|
void DumpReader :: readSet( int whichFrame ){ |
173 |
|
|
174 |
< |
int i, j; |
174 |
> |
int i; |
175 |
> |
unsigned int j; |
176 |
|
|
177 |
|
#ifdef IS_MPI |
178 |
|
int done, which_node, which_atom; // loop counter |
612 |
|
|
613 |
|
qSqr = (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]); |
614 |
|
|
615 |
+ |
if (fabs(qSqr) < 1e-6) { |
616 |
+ |
sprintf(painCave.errMsg, |
617 |
+ |
"initial quaternion error (q0^2 + q1^2 + q2^2 + q3^2 ~ 0).\n"); |
618 |
+ |
return strdup(painCave.errMsg); |
619 |
+ |
} |
620 |
+ |
|
621 |
|
qLength = sqrt( qSqr ); |
622 |
|
q[0] = q[0] / qLength; |
623 |
|
q[1] = q[1] / qLength; |