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

Comparing trunk/OOPSE/libmdtools/SimState.cpp (file contents):
Revision 1149 by tim, Tue Apr 27 16:26:44 2004 UTC vs.
Revision 1150 by gezelter, Fri May 7 21:35:05 2004 UTC

# Line 19 | Line 19 | SimState::SimState(){
19    Amat = NULL;
20    mu   = NULL;
21    ul   = NULL;
22 +  rc   = NULL;
23 +  massRatio = NULL;
24   }
25  
26  
# Line 31 | Line 33 | SimState::~SimState(){
33    if(Amat != NULL) delete[] Amat;
34    if(mu   != NULL) delete[] mu;
35    if(ul   != NULL) delete[] ul;  
36 +  if(rc   != NULL) delete[] rc;  
37 +  if(massRatio != NULL) delete[] massRatio;  
38  
39   }
40  
# Line 56 | Line 60 | void SimState::createArrays (int the_nElements) {
60    Amat = new double[nElements*9];
61    mu   = new double[nElements];
62    ul   = new double[nElements*3];
63 <  rc = new double[nElements*3];
63 >  rc   = new double[nElements*3];
64    massRatio = new double[nElements];
65    
66    // init directional values to zero
# Line 100 | Line 104 | void SimState::destroyArrays( void ){
104    if(Amat != NULL) delete[] Amat;
105    if(mu   != NULL) delete[] mu;
106    if(ul   != NULL) delete[] ul;  
107 <  if(rc != NULL) delete[] rc;
107 >  if(rc   != NULL) delete[] rc;
108    if(massRatio != NULL) delete[] massRatio;
109  
110    pos  = NULL;
# Line 110 | Line 114 | void SimState::destroyArrays( void ){
114    Amat = NULL;
115    mu   = NULL;
116    ul   = NULL;
117 <  rc = NULL;
117 >  rc   = NULL;
118    massRatio = NULL;
119  
120    arraysAllocated = false;
# Line 141 | Line 145 | void SimState::getAtomPointers( int index,
145      *the_Amat = &(Amat[index9]);
146      *the_mu   = &(mu[index]);
147      *the_ul   = &(ul[index3]);
148 <    *the_rc = &(rc[index3]);
148 >    *the_rc   = &(rc[index3]);
149      *the_massRatio = &(massRatio[index]);
150    }
151    else{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines