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 1136 by tim, Tue Apr 27 16:26:44 2004 UTC vs.
Revision 1167 by tim, Wed May 12 16:38:45 2004 UTC

# Line 56 | Line 56 | void SimState::createArrays (int the_nElements) {
56    Amat = new double[nElements*9];
57    mu   = new double[nElements];
58    ul   = new double[nElements*3];
59  rc = new double[nElements*3];
60  massRatio = new double[nElements];
59    
60    // init directional values to zero
61    
# Line 100 | Line 98 | void SimState::destroyArrays( void ){
98    if(Amat != NULL) delete[] Amat;
99    if(mu   != NULL) delete[] mu;
100    if(ul   != NULL) delete[] ul;  
103  if(rc != NULL) delete[] rc;
104  if(massRatio != NULL) delete[] massRatio;
101  
102    pos  = NULL;
103    vel  = NULL;
# Line 110 | Line 106 | void SimState::destroyArrays( void ){
106    Amat = NULL;
107    mu   = NULL;
108    ul   = NULL;
113  rc = NULL;
114  massRatio = NULL;
109  
110 +
111    arraysAllocated = false;
112    nElements = 0;
113   }
# Line 124 | Line 119 | void SimState::getAtomPointers( int index,
119                                  double** the_trq,
120                                  double** the_Amat,
121                                  double** the_mu,
122 <                                double** the_ul,
128 <                                double** the_rc,
129 <                                double** the_massRatio){
122 >                                double** the_ul){
123    int index3, index9;
124  
125    if( arraysAllocated ){
# Line 141 | Line 134 | void SimState::getAtomPointers( int index,
134      *the_Amat = &(Amat[index9]);
135      *the_mu   = &(mu[index]);
136      *the_ul   = &(ul[index3]);
144    *the_rc = &(rc[index3]);
145    *the_massRatio = &(massRatio[index]);
137    }
138    else{
139  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines