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

Comparing trunk/OOPSE-4/src/types/AtomType.cpp (file contents):
Revision 1638 by chrisfen, Fri Oct 22 23:00:06 2004 UTC vs.
Revision 1670 by gezelter, Thu Oct 28 16:56:20 2004 UTC

# Line 13 | Line 13 | namespace oopse {
13      
14      // initialize to an error:
15      atp.ident = -1;
16 <    // make the type empty:
17 <    name = NULL;
16 >
17      // and massless:
18      mass = 0.0;
19      
20      // atom type is a Tabula Rasa:
21 +    atp.is_Directional = 0;
22      atp.is_LennardJones = 0;
23      atp.is_Electrostatic = 0;
24      atp.is_Charge = 0;
25 <    atp.is_Directional = 0;
25 >    atp.is_Dipole = 0;
26      atp.is_Sticky = 0;
27      atp.is_GayBerne = 0;
28      atp.is_EAM = 0;
# Line 30 | Line 30 | namespace oopse {
30      atp.is_FLARB = 0;  
31    }
32      
33  AtomType::~AtomType() {
34    if ( name != NULL ) free(name);
35  }
36
33    void AtomType::complete() {
34      
35      int status;
36  
37 <    if (name == NULL) {
37 >    if (name.empty()) {
38        sprintf( painCave.errMsg,
39                 "Attempting to complete an AtomType without giving "
40                 "it a name!\n");
# Line 50 | Line 46 | namespace oopse {
46      if (atp.ident == -1) {
47        sprintf( painCave.errMsg,
48                 "Attempting to complete AtomType %s without setting the"
49 <               " ident!/n", name);
49 >               " ident!/n", name.c_str());
50        painCave.severity = OOPSE_ERROR;
51        painCave.isFatal = 1;
52        simError();          
# Line 62 | Line 58 | namespace oopse {
58      
59      if (status != 0) {
60        sprintf( painCave.errMsg,
61 <               "Fortran rejected AtomType %s!\n", name);
61 >               "Fortran rejected AtomType %s!\n", name.c_str());
62        painCave.severity = OOPSE_ERROR;
63        painCave.isFatal = 1;
64        simError();          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines