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 308 by mmeineke, Mon Mar 10 21:44:31 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 = 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          }
# Line 747 | Line 804 | void SimSetup::makeBends( void ){
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines