ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/hydrodynamics/BeadModel.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/hydrodynamics/BeadModel.cpp (file contents):
Revision 2733 by gezelter, Tue Apr 25 02:06:12 2006 UTC vs.
Revision 2734 by gezelter, Tue Apr 25 13:35:42 2006 UTC

# Line 97 | Line 97 | namespace oopse {
97            simError();          
98          }      
99        }
100 <    } else if (atomType->isEAM()) {
101 <      GenericData* data = atomType->getPropertyByName("EAM");
102 <      if (data != NULL) {
103 <        EAMParamGenericData* eamData = dynamic_cast<EAMParamGenericData*>(data);          
104 <        if (eamData != NULL) {
105 <          EAMParam eamParam = eamData->getData();
106 <          BeadParam currBead;
107 <          currBead.atomName = atom->getType();
108 <          currBead.pos = atom->getPos();
109 <          currBead.radius = eamParam.rcut;
110 <          beads.push_back(currBead);
111 <        } else {
112 <          sprintf( painCave.errMsg,
113 <                   "Can not cast GenericData to EAMParam\n");
114 <          painCave.severity = OOPSE_ERROR;
115 <          painCave.isFatal = 1;
116 <          simError();          
117 <        }      
100 >    } else {
101 >      int obanum = etab.GetAtomicNum((atom->getType()).c_str());
102 >      if (obanum != 0) {
103 >        BeadParam currBead;      
104 >        currBead.atomName = atom->getType();
105 >        currBead.pos = atom->getPos();        
106 >        currBead.radius = etab.GetVdwRad(obanum);
107 >        std::cout << "using rvdw = " << currBead.radius << " for atomic number " << obanum << "\n";
108 >        beads.push_back(currBead);
109 >      } else {
110 >        sprintf( painCave.errMsg,
111 >                 "Could not find atom type in default element.txt\n");
112 >        painCave.severity = OOPSE_ERROR;
113 >        painCave.isFatal = 1;
114 >        simError();          
115        }
116 <      return true;
117 <    }  
116 >    }
117 >    return true;    
118    }
119   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines