ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/SimSetup.cpp (file contents):
Revision 290 by chuckv, Thu Feb 27 21:25:47 2003 UTC vs.
Revision 311 by mmeineke, Tue Mar 11 16:27:34 2003 UTC

# Line 710 | Line 710 | void SimSetup::makeBends( void ){
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;
# Line 731 | Line 734 | void SimSetup::makeBends( void ){
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 =
749 >                    current_extra->getInt() + offset;
750 >                  the_bends[index].isGhost = 1;
751 >                  break;
752 >                  
753 >                case 1:
754 >                  the_bends[index].ghost =
755 >                    (int)current_extra->getDouble() + offset;
756 >                  the_bends[index].isGhost = 1;
757 >                  break;
758 >                  
759 >                default:
760 >                  sprintf( painCave.errMsg,
761 >                           "SimSetup Error: ghostVectorSource was neiter a "
762 >                           "double nor an int.\n"
763 >                           "-->Bend[%d] in %s\n",
764 >                           k, comp_stamps[i]->getID() );
765 >                  painCave.isFatal = 1;
766 >                  simError();
767 >                }
768 >              }
769 >              
770 >              else{
771 >                
772 >                sprintf( painCave.errMsg,
773 >                         "SimSetup Error: unhandled bend assignment:\n"
774 >                         "    -->%s in Bend[%d] in %s\n",
775 >                         current_extra->getlhs(),
776 >                         k, comp_stamps[i]->getID() );
777 >                painCave.isFatal = 1;
778 >                simError();
779 >              }
780 >              
781 >              current_extra = current_extra->next;
782 >            }
783 >          }
784 >          
785 >          if( !the_bends[index].isGhost ){
786 >            
787 >            the_excludes[index + tot_bonds].i = the_bends[index].a;
788 >            the_excludes[index + tot_bonds].j = the_bends[index].c;
789 >          }
790 >          else{
791 >            
792 >            the_excludes[index + tot_bonds].i = the_bends[index].a;
793 >            the_excludes[index + tot_bonds].j = the_bends[index].b;
794 >          }
795            
796            // increment the index and repeat;
797            index++;
# Line 747 | Line 806 | void SimSetup::makeBends( void ){
806      }
807    }
808  
809 + #ifdef IS_MPI
810 +  sprintf( checkPointMsg,
811 +           "Successfully created the bends list.\n" );
812 +  MPIcheckPoint();
813 + #endif // is_mpi
814 +  
815 +
816    the_ff->initializeBends( the_bends );
817   }
818  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines