| 16 | 
  | 
  n_constraints = 0; | 
| 17 | 
  | 
  n_oriented = 0; | 
| 18 | 
  | 
  n_dipoles = 0; | 
| 19 | 
+ | 
  ndf = 0; | 
| 20 | 
+ | 
  ndfRaw = 0; | 
| 21 | 
  | 
  the_integrator = NULL; | 
| 22 | 
  | 
  setTemp = 0; | 
| 23 | 
  | 
  thermalTime = 0.0; | 
| 31 | 
  | 
  useGB = 0; | 
| 32 | 
  | 
  useEAM = 0; | 
| 33 | 
  | 
 | 
| 34 | 
+ | 
  wrapMeSimInfo( this ); | 
| 35 | 
+ | 
} | 
| 36 | 
  | 
 | 
| 37 | 
+ | 
void SimInfo::setBox(double newBox[3]) { | 
| 38 | 
+ | 
  box_x = newBox[0]; | 
| 39 | 
+ | 
  box_y = newBox[1]; | 
| 40 | 
+ | 
  box_z = newBox[2]; | 
| 41 | 
+ | 
  setFortranBoxSize(newBox); | 
| 42 | 
+ | 
} | 
| 43 | 
  | 
 | 
| 44 | 
< | 
  wrapMeSimInfo( this ); | 
| 44 | 
> | 
void SimInfo::getBox(double theBox[3]) { | 
| 45 | 
> | 
  theBox[0] = box_x; | 
| 46 | 
> | 
  theBox[1] = box_y; | 
| 47 | 
> | 
  theBox[2] = box_z; | 
| 48 | 
  | 
} | 
| 49 | 
+ | 
  | 
| 50 | 
+ | 
int SimInfo::getNDF(){ | 
| 51 | 
+ | 
  int ndf_local, ndf; | 
| 52 | 
+ | 
   | 
| 53 | 
+ | 
  ndf_local = 3 * n_atoms + 3 * n_oriented - n_constraints; | 
| 54 | 
  | 
 | 
| 55 | 
+ | 
#ifdef IS_MPI | 
| 56 | 
+ | 
  MPI_Allreduce(&ndf_local,&ndf,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 57 | 
+ | 
#else | 
| 58 | 
+ | 
  ndf = ndf_local; | 
| 59 | 
+ | 
#endif | 
| 60 | 
+ | 
 | 
| 61 | 
+ | 
  ndf = ndf - 3; | 
| 62 | 
+ | 
 | 
| 63 | 
+ | 
  return ndf; | 
| 64 | 
+ | 
} | 
| 65 | 
+ | 
 | 
| 66 | 
+ | 
int SimInfo::getNDFraw() { | 
| 67 | 
+ | 
  int ndfRaw_local, ndfRaw; | 
| 68 | 
+ | 
 | 
| 69 | 
+ | 
  // Raw degrees of freedom that we have to set | 
| 70 | 
+ | 
  ndfRaw_local = 3 * n_atoms + 3 * n_oriented; | 
| 71 | 
+ | 
   | 
| 72 | 
+ | 
#ifdef IS_MPI | 
| 73 | 
+ | 
  MPI_Allreduce(&ndfRaw_local,&ndfRaw,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 74 | 
+ | 
#else | 
| 75 | 
+ | 
  ndfRaw = ndfRaw_local; | 
| 76 | 
+ | 
#endif | 
| 77 | 
+ | 
 | 
| 78 | 
+ | 
  return ndfRaw; | 
| 79 | 
+ | 
} | 
| 80 | 
+ | 
  | 
| 81 | 
  | 
void SimInfo::refreshSim(){ | 
| 82 | 
  | 
 | 
| 83 | 
  | 
  simtype fInfo; | 
| 135 | 
  | 
           "succesfully sent the simulation information to fortran.\n"); | 
| 136 | 
  | 
  MPIcheckPoint(); | 
| 137 | 
  | 
#endif // is_mpi | 
| 138 | 
+ | 
 | 
| 139 | 
+ | 
  ndf = this->getNDF(); | 
| 140 | 
+ | 
  ndfRaw = this->getNDFraw(); | 
| 141 | 
+ | 
 | 
| 142 | 
  | 
} | 
| 143 | 
  | 
 |