| 1 | 
< | 
#include <cmath> | 
| 1 | 
> | 
#include <math.h> | 
| 2 | 
  | 
 | 
| 3 | 
  | 
#include "Atom.hpp" | 
| 4 | 
  | 
#include "simError.h" | 
| 39 | 
  | 
  else{ | 
| 40 | 
  | 
    sprintf( painCave.errMsg, | 
| 41 | 
  | 
             "Attempted to set Atom %d  coordinates with an unallocated " | 
| 42 | 
< | 
             "SimState object.\n" ); | 
| 42 | 
> | 
             "SimState object.\n", index ); | 
| 43 | 
  | 
    painCave.isFatal = 1; | 
| 44 | 
  | 
    simError(); | 
| 45 | 
  | 
  } | 
| 46 | 
  | 
 | 
| 47 | 
  | 
  hasCoords = true; | 
| 48 | 
  | 
 | 
| 49 | 
< | 
  mu[index] = myMu; | 
| 49 | 
> | 
  *mu = myMu; | 
| 50 | 
  | 
 | 
| 51 | 
  | 
} | 
| 52 | 
  | 
 | 
| 53 | 
  | 
double DirectionalAtom::getMu( void ) { | 
| 54 | 
  | 
 | 
| 55 | 
  | 
  if( hasCoords ){ | 
| 56 | 
< | 
    return mu[index]; | 
| 56 | 
> | 
    return *mu; | 
| 57 | 
  | 
  } | 
| 58 | 
  | 
  else{ | 
| 59 | 
  | 
    return myMu; | 
| 60 | 
  | 
  } | 
| 61 | 
– | 
  return 0; | 
| 61 | 
  | 
} | 
| 62 | 
  | 
 | 
| 63 | 
  | 
void DirectionalAtom::setMu( double the_mu ) {  | 
| 64 | 
  | 
 | 
| 65 | 
  | 
  if( hasCoords ){ | 
| 66 | 
< | 
    mu[index] = the_mu; | 
| 66 | 
> | 
    *mu = the_mu; | 
| 67 | 
  | 
    myMu = the_mu; | 
| 68 | 
  | 
  } | 
| 69 | 
  | 
  else{ |