265 |
|
} |
266 |
|
} |
267 |
|
myStatus = -1; |
268 |
< |
for (j = 0; j < mpiSim->getNumberProcessors(); j++) { |
268 |
> |
for (j = 1; j < mpiSim->getNumberProcessors(); j++) { |
269 |
|
MPI_Send( &myStatus, 1, MPI_INT, j, |
270 |
|
TAKE_THIS_TAG_INT, MPI_COMM_WORLD); |
271 |
|
} |
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); |
593 |
< |
|
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 |
> |
foo = strtok(NULL, " ,;\t\n"); |
622 |
> |
if(foo != NULL ){ |
623 |
> |
|
624 |
> |
for(int i = 0 ; i < 9; i++){ |
625 |
> |
|
626 |
> |
if(foo == NULL){ |
627 |
> |
sprintf( painCave.errMsg, |
628 |
> |
"error in reading eta[%d] from %s\n", i, c_in_name ); |
629 |
> |
return strdup( painCave.errMsg ); |
630 |
> |
} |
631 |
> |
eta[i] = atof( foo ); |
632 |
> |
foo = strtok(NULL, " ,;\t\n"); |
633 |
> |
} |
634 |
> |
} |
635 |
> |
else |
636 |
> |
return NULL; |
637 |
> |
|
638 |
> |
//push eta into SimInfo::properties which can be |
639 |
|
//retrieved by integrator later |
640 |
< |
DoubleData* chiValue = new DoubleData(); |
641 |
< |
chiValue->setID(CHIVALUE_ID); |
642 |
< |
chiValue->setData(chi); |
643 |
< |
entry_plug->addProperty(chiValue); |
644 |
< |
|
609 |
< |
DoubleData* integralOfChidtValue = new DoubleData(); |
610 |
< |
integralOfChidtValue->setID(INTEGRALOFCHIDT_ID); |
611 |
< |
integralOfChidtValue->setData(integralOfChidt); |
612 |
< |
entry_plug->addProperty(integralOfChidtValue); |
613 |
< |
|
640 |
> |
//entry_plug->setBoxM( theBoxMat3 ); |
641 |
> |
DoubleArrayData* etaValue = new DoubleArrayData(); |
642 |
> |
etaValue->setID(ETAVALUE_ID); |
643 |
> |
etaValue->setData(eta, 9); |
644 |
> |
entry_plug->addProperty(etaValue); |
645 |
|
} |
615 |
– |
else |
616 |
– |
return NULL; |
646 |
|
|
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 |
– |
|
647 |
|
return NULL; |
648 |
|
} |
649 |
|
|