ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new-templateless/OOPSE/libmdtools/NPTxyz.cpp
(Generate patch)

Comparing branches/new-templateless/OOPSE/libmdtools/NPTxyz.cpp (file contents):
Revision 850 by mmeineke, Mon Nov 3 22:07:17 2003 UTC vs.
Revision 851 by mmeineke, Wed Nov 5 19:18:17 2003 UTC

# Line 302 | Line 302 | double NPTxyz::getConservedQuantity(void){
302    return conservedQuantity;
303  
304   }
305
306 string NPTxyz::getAdditionalParameters(void){
307  string parameters;
308  const int BUFFERSIZE = 2000; // size of the read buffer
309  char buffer[BUFFERSIZE];
305  
306 <  sprintf(buffer,"\t%lf\t%lf;", chi, integralOfChidt);
312 <  parameters += buffer;
306 > char* NPTxyz::getAdditionalParameters(void){
307  
308 <  for(int i = 0; i < 3; i++){
309 <    sprintf(buffer,"\t%lf\t%lf\t%lf;", eta[3*i], eta[3*i+1], eta[3*i+2]);
310 <    parameters += buffer;
311 <  }
308 >  sprintf(addParamBuffer,
309 >          "\t%G\t%G;"
310 >          "\t%G\t%G\t%G;"
311 >          "\t%G\t%G\t%G;"
312 >          "\t%G\t%G\t%G;",
313 >          chi, integralOfChidt,
314 >          eta[0][0], eta[0][1], eta[0][2],
315 >          eta[1][0], eta[1][1], eta[1][2],
316 >          eta[2][0], eta[2][1], eta[2][2]
317 >          );
318  
319 <  return parameters;
320 <
319 >  return addParamBuffer;
320   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines