| 19 | 
  | 
  Amat = NULL; | 
| 20 | 
  | 
  mu   = NULL; | 
| 21 | 
  | 
  ul   = NULL; | 
| 22 | 
– | 
  rc   = NULL; | 
| 23 | 
– | 
  massRatio = NULL; | 
| 22 | 
  | 
} | 
| 23 | 
  | 
 | 
| 24 | 
  | 
 | 
| 31 | 
  | 
  if(Amat != NULL) delete[] Amat; | 
| 32 | 
  | 
  if(mu   != NULL) delete[] mu; | 
| 33 | 
  | 
  if(ul   != NULL) delete[] ul;   | 
| 36 | 
– | 
  if(rc   != NULL) delete[] rc;   | 
| 37 | 
– | 
  if(massRatio != NULL) delete[] massRatio;   | 
| 34 | 
  | 
 | 
| 35 | 
  | 
} | 
| 36 | 
  | 
 | 
| 56 | 
  | 
  Amat = new double[nElements*9]; | 
| 57 | 
  | 
  mu   = new double[nElements]; | 
| 58 | 
  | 
  ul   = new double[nElements*3]; | 
| 63 | 
– | 
  rc   = new double[nElements*3]; | 
| 64 | 
– | 
  massRatio = new double[nElements]; | 
| 59 | 
  | 
   | 
| 60 | 
  | 
  // init directional values to zero | 
| 61 | 
  | 
   | 
| 98 | 
  | 
  if(Amat != NULL) delete[] Amat; | 
| 99 | 
  | 
  if(mu   != NULL) delete[] mu; | 
| 100 | 
  | 
  if(ul   != NULL) delete[] ul;   | 
| 107 | 
– | 
  if(rc   != NULL) delete[] rc; | 
| 108 | 
– | 
  if(massRatio != NULL) delete[] massRatio; | 
| 101 | 
  | 
 | 
| 102 | 
  | 
  pos  = NULL; | 
| 103 | 
  | 
  vel  = NULL; | 
| 106 | 
  | 
  Amat = NULL; | 
| 107 | 
  | 
  mu   = NULL; | 
| 108 | 
  | 
  ul   = NULL; | 
| 117 | 
– | 
  rc   = NULL; | 
| 118 | 
– | 
  massRatio = NULL; | 
| 109 | 
  | 
 | 
| 110 | 
+ | 
 | 
| 111 | 
  | 
  arraysAllocated = false; | 
| 112 | 
  | 
  nElements = 0; | 
| 113 | 
  | 
} | 
| 119 | 
  | 
                                double** the_trq, | 
| 120 | 
  | 
                                double** the_Amat, | 
| 121 | 
  | 
                                double** the_mu,  | 
| 122 | 
< | 
                                double** the_ul,  | 
| 132 | 
< | 
                                double** the_rc, | 
| 133 | 
< | 
                                double** the_massRatio){ | 
| 122 | 
> | 
                                double** the_ul){ | 
| 123 | 
  | 
  int index3, index9; | 
| 124 | 
  | 
 | 
| 125 | 
  | 
  if( arraysAllocated ){ | 
| 134 | 
  | 
    *the_Amat = &(Amat[index9]); | 
| 135 | 
  | 
    *the_mu   = &(mu[index]);  | 
| 136 | 
  | 
    *the_ul   = &(ul[index3]); | 
| 148 | 
– | 
    *the_rc   = &(rc[index3]); | 
| 149 | 
– | 
    *the_massRatio = &(massRatio[index]); | 
| 137 | 
  | 
  } | 
| 138 | 
  | 
  else{ | 
| 139 | 
  | 
 |