| 587 |
|
entry_plug->setBoxM( theBoxMat3 ); |
| 588 |
|
|
| 589 |
|
//get chi and integralOfChidt, they should appear by pair |
| 590 |
– |
foo = strtok(NULL, " ,;\t\n"); |
| 591 |
– |
if(foo != NULL){ |
| 592 |
– |
chi = atof(foo); |
| 590 |
|
|
| 591 |
+ |
if( entry_plug->useInitXSstate ){ |
| 592 |
|
foo = strtok(NULL, " ,;\t\n"); |
| 593 |
< |
if(foo == NULL){ |
| 594 |
< |
sprintf( painCave.errMsg, |
| 595 |
< |
"chi and integralOfChidt should appear by pair in %s\n", c_in_name ); |
| 596 |
< |
return strdup( painCave.errMsg ); |
| 593 |
> |
if(foo != NULL){ |
| 594 |
> |
chi = atof(foo); |
| 595 |
> |
|
| 596 |
> |
foo = strtok(NULL, " ,;\t\n"); |
| 597 |
> |
if(foo == NULL){ |
| 598 |
> |
sprintf( painCave.errMsg, |
| 599 |
> |
"chi and integralOfChidt should appear by pair in %s\n", c_in_name ); |
| 600 |
> |
return strdup( painCave.errMsg ); |
| 601 |
> |
} |
| 602 |
> |
integralOfChidt = atof( foo ); |
| 603 |
> |
|
| 604 |
> |
//push chi and integralOfChidt into SimInfo::properties which can be |
| 605 |
> |
//retrieved by integrator later |
| 606 |
> |
DoubleData* chiValue = new DoubleData(); |
| 607 |
> |
chiValue->setID(CHIVALUE_ID); |
| 608 |
> |
chiValue->setData(chi); |
| 609 |
> |
entry_plug->addProperty(chiValue); |
| 610 |
> |
|
| 611 |
> |
DoubleData* integralOfChidtValue = new DoubleData(); |
| 612 |
> |
integralOfChidtValue->setID(INTEGRALOFCHIDT_ID); |
| 613 |
> |
integralOfChidtValue->setData(integralOfChidt); |
| 614 |
> |
entry_plug->addProperty(integralOfChidtValue); |
| 615 |
> |
|
| 616 |
|
} |
| 617 |
< |
integralOfChidt = atof( foo ); |
| 618 |
< |
|
| 619 |
< |
//push chi and integralOfChidt into SimInfo::properties which can be |
| 617 |
> |
else |
| 618 |
> |
return NULL; |
| 619 |
> |
|
| 620 |
> |
//get eta |
| 621 |
> |
for(int i = 0 ; i < 9; i++){ |
| 622 |
> |
foo = strtok(NULL, " ,;\t"); |
| 623 |
> |
if(foo == NULL){ |
| 624 |
> |
sprintf( painCave.errMsg, |
| 625 |
> |
"error in reading eta[%d] from %s\n", i, c_in_name ); |
| 626 |
> |
return strdup( painCave.errMsg ); |
| 627 |
> |
} |
| 628 |
> |
eta[i] = atof( foo ); |
| 629 |
> |
} |
| 630 |
> |
|
| 631 |
> |
//push eta into SimInfo::properties which can be |
| 632 |
|
//retrieved by integrator later |
| 633 |
< |
DoubleData* chiValue = new DoubleData(); |
| 634 |
< |
chiValue->setID(CHIVALUE_ID); |
| 635 |
< |
chiValue->setData(chi); |
| 636 |
< |
entry_plug->addProperty(chiValue); |
| 637 |
< |
|
| 609 |
< |
DoubleData* integralOfChidtValue = new DoubleData(); |
| 610 |
< |
integralOfChidtValue->setID(INTEGRALOFCHIDT_ID); |
| 611 |
< |
integralOfChidtValue->setData(integralOfChidt); |
| 612 |
< |
entry_plug->addProperty(integralOfChidtValue); |
| 613 |
< |
|
| 633 |
> |
//entry_plug->setBoxM( theBoxMat3 ); |
| 634 |
> |
DoubleArrayData* etaValue = new DoubleArrayData(); |
| 635 |
> |
etaValue->setID(ETAVALUE_ID); |
| 636 |
> |
etaValue->setData(eta, 9); |
| 637 |
> |
entry_plug->addProperty(etaValue); |
| 638 |
|
} |
| 615 |
– |
else |
| 616 |
– |
return NULL; |
| 639 |
|
|
| 618 |
– |
//get eta |
| 619 |
– |
for(int i = 0 ; i < 9; i++){ |
| 620 |
– |
foo = strtok(NULL, " ,;\t"); |
| 621 |
– |
if(foo == NULL){ |
| 622 |
– |
sprintf( painCave.errMsg, |
| 623 |
– |
"error in reading eta[%d] from %s\n", i, c_in_name ); |
| 624 |
– |
return strdup( painCave.errMsg ); |
| 625 |
– |
} |
| 626 |
– |
eta[i] = atof( foo ); |
| 627 |
– |
} |
| 628 |
– |
|
| 629 |
– |
//push eta into SimInfo::properties which can be |
| 630 |
– |
//retrieved by integrator later |
| 631 |
– |
//entry_plug->setBoxM( theBoxMat3 ); |
| 632 |
– |
DoubleArrayData* etaValue = new DoubleArrayData(); |
| 633 |
– |
etaValue->setID(ETAVALUE_ID); |
| 634 |
– |
etaValue->setData(eta, 9); |
| 635 |
– |
entry_plug->addProperty(etaValue); |
| 636 |
– |
|
| 637 |
– |
|
| 640 |
|
return NULL; |
| 641 |
|
} |
| 642 |
|
|