DataStream.C

Go to the documentation of this file.
00001 
00007 /*
00008    Defines a new stream: dout, for data logs.
00009 */
00010 
00011 #include "DataStream.h"
00012 #include "CollectionMgr.h"
00013 #include "Vector.h"
00014 #include "Tensor.h"
00015 #include <stdio.h>
00016 
00017 /* output using CkPrintf() (end by inform) */
00018 void datastream::endd() {
00019   *this << std::ends;
00020   std::string datastr = str();
00021   CollectionMgr::Object()->sendDataStream(datastr.c_str());
00022   str("");
00023 }
00024 
00025 datastream& operator<<(datastream& strm, const Vector &v1) {
00026        strm << v1.x << " " << v1.y << " " << v1.z;
00027        return strm;
00028 }
00029 
00030 datastream& operator<<(datastream& strm, const Tensor &t1) {
00031        strm << t1.xx << " " << t1.xy << " " << t1.xz << " "
00032             << t1.yx << " " << t1.yy << " " << t1.yz << " "
00033             << t1.zx << " " << t1.zy << " " << t1.zz;
00034        return strm;
00035 }
00036 
00037 datastream dout;
00038 

Generated on Sat Nov 18 01:17:13 2017 for NAMD by  doxygen 1.4.7