| 710 |
|
int i, j, k, index, offset, molIndex; |
| 711 |
|
bend_set* the_bends; |
| 712 |
|
BendStamp* current_bend; |
| 713 |
+ |
LinkedAssign* extras; |
| 714 |
+ |
LinkedAssign* current_extra; |
| 715 |
+ |
|
| 716 |
|
|
| 717 |
|
the_bends = new bend_set[tot_bends]; |
| 718 |
|
index = 0; |
| 734 |
|
the_bends[index].b = current_bend->getB() + offset; |
| 735 |
|
the_bends[index].c = current_bend->getC() + offset; |
| 736 |
|
|
| 737 |
< |
the_excludes[index + tot_bonds].i = the_bends[index].a; |
| 738 |
< |
the_excludes[index + tot_bonds].j = the_bends[index].c; |
| 737 |
> |
if( current_bend->haveExtras ){ |
| 738 |
> |
|
| 739 |
> |
extras = current_bend->getExtras(); |
| 740 |
> |
current_extra = extras; |
| 741 |
> |
|
| 742 |
> |
while( current_extra != NULL ){ |
| 743 |
> |
if( !strcmp( current_extra->getlhs(), "ghostVectorSource" )){ |
| 744 |
> |
|
| 745 |
> |
switch( current_extra->getType() ){ |
| 746 |
> |
|
| 747 |
> |
case 0: |
| 748 |
> |
the_bends[index].ghost = current_extra->getInt(); |
| 749 |
> |
the_bends[index].isGhost = 1; |
| 750 |
> |
break; |
| 751 |
> |
|
| 752 |
> |
case 1: |
| 753 |
> |
the_bends[index].ghost = (int)current_extra->getDouble(); |
| 754 |
> |
the_bends[index].isGhost = 1; |
| 755 |
> |
break; |
| 756 |
> |
|
| 757 |
> |
default: |
| 758 |
> |
sprintf( painCave.errMsg, |
| 759 |
> |
"SimSetup Error: ghostVectorSource was neiter a " |
| 760 |
> |
"double nor an int.\n" |
| 761 |
> |
"-->Bend[%d] in %s\n", |
| 762 |
> |
k, comp_stamps[i]->getID() ); |
| 763 |
> |
painCave.isFatal = 1; |
| 764 |
> |
simError(); |
| 765 |
> |
} |
| 766 |
> |
} |
| 767 |
> |
|
| 768 |
> |
else{ |
| 769 |
> |
|
| 770 |
> |
sprintf( painCave.errMsg, |
| 771 |
> |
"SimSetup Error: unhandled bend assignment:\n" |
| 772 |
> |
" -->%s in Bend[%d] in %s\n", |
| 773 |
> |
current_extra->getlhs(), |
| 774 |
> |
k, comp_stamps[i]->getID() ); |
| 775 |
> |
painCave.isFatal = 1; |
| 776 |
> |
simError(); |
| 777 |
> |
} |
| 778 |
> |
|
| 779 |
> |
current_extra = current_extra->next; |
| 780 |
> |
} |
| 781 |
> |
} |
| 782 |
|
|
| 783 |
+ |
if( !the_bends[index].isGhost ){ |
| 784 |
+ |
|
| 785 |
+ |
the_excludes[index + tot_bonds].i = the_bends[index].a; |
| 786 |
+ |
the_excludes[index + tot_bonds].j = the_bends[index].c; |
| 787 |
+ |
} |
| 788 |
+ |
else{ |
| 789 |
+ |
|
| 790 |
+ |
the_excludes[index + tot_bonds].i = the_bends[index].a; |
| 791 |
+ |
the_excludes[index + tot_bonds].j = the_bends[index].b; |
| 792 |
+ |
} |
| 793 |
+ |
|
| 794 |
|
// increment the index and repeat; |
| 795 |
|
index++; |
| 796 |
|
} |
| 804 |
|
} |
| 805 |
|
} |
| 806 |
|
|
| 807 |
+ |
#ifdef IS_MPI |
| 808 |
+ |
sprintf( checkPointMsg, |
| 809 |
+ |
"Successfully created the bends list.\n" ); |
| 810 |
+ |
MPIcheckPoint(); |
| 811 |
+ |
#endif // is_mpi |
| 812 |
+ |
|
| 813 |
+ |
|
| 814 |
|
the_ff->initializeBends( the_bends ); |
| 815 |
|
} |
| 816 |
|
|