ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/DUFF.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/DUFF.cpp (file contents):
Revision 787 by mmeineke, Thu Sep 25 19:27:15 2003 UTC vs.
Revision 950 by mmeineke, Fri Jan 16 15:01:14 2004 UTC

# Line 1 | Line 1
1 < #include <cstdlib>
2 < #include <cstdio>
3 < #include <cstring>
1 > #include <stdlib.h>
2 > #include <stdio.h>
3 > #include <string.h>
4  
5   #include <iostream>
6   using namespace std;
# Line 32 | Line 32 | namespace DUFF_NS {  // restrict the access of the fol
32      double mass;
33      double epslon;
34      double sigma;
35 +    double charge;
36      double dipole;
37      double w0;
38      double v0;
# Line 41 | Line 42 | namespace DUFF_NS {  // restrict the access of the fol
42      double rlp;
43      double rup;
44      int isSSD;
45 +    int isCharge;
46      int isDipole;
47      int ident;
48      int last;      //  0  -> default
# Line 475 | Line 477 | DUFF::DUFF(){
477    // Init the atomStruct mpi type
478  
479    atomStruct atomProto; // mpiPrototype
480 <  int atomBC[3] = {15,11,4};  // block counts
480 >  int atomBC[3] = {15,12,5};  // block counts
481    MPI_Aint atomDspls[3];           // displacements
482    MPI_Datatype atomMbrTypes[3];    // member mpi types
483  
# Line 728 | Line 730 | void DUFF::readParams( void ){
730      currentAtomType = headAtomType->next; //skip the first element who is a place holder.
731      while( currentAtomType != NULL ){
732        currentAtomType->duplicate( atomInfo );
731
732
733  
734        sendFrcStruct( &atomInfo, mpiAtomStructType );
735  
# Line 748 | Line 748 | void DUFF::readParams( void ){
748    else{
749      
750      // listen for node 0 to send out the force params
751 <    
751 >
752      MPIcheckPoint();
753  
754      headAtomType = new LinkedAtomType;
# Line 756 | Line 756 | void DUFF::readParams( void ){
756      
757      while( !atomInfo.last ){
758  
759
760
759        headAtomType->add( atomInfo );
760        
761        MPIcheckPoint();
# Line 779 | Line 777 | void DUFF::readParams( void ){
777    int isGB = 0;
778    int isLJ = 1;
779    int isEAM =0;
780 +  int isCharge = 0;
781 +  double charge=0.0;
782      
783    currentAtomType = headAtomType->next;;
784    while( currentAtomType != NULL ){
785      
786 <    if(currentAtomType->isDipole) entry_plug->useDipole = 1;
786 >    if(currentAtomType->isDipole) entry_plug->useDipoles = 1;
787      if(currentAtomType->isSSD) {
788        entry_plug->useSticky = 1;
789        set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0),
# Line 800 | Line 800 | void DUFF::readParams( void ){
800                   &(currentAtomType->isDipole),
801                   &isGB,
802                   &isEAM,
803 +                 &isCharge,
804                   &(currentAtomType->epslon),
805                   &(currentAtomType->sigma),
806 +                 &charge,
807                   &(currentAtomType->dipole),
808                   &isError );
809        if( isError ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines