NAMD
DataStream.C
Go to the documentation of this file.
1 
7 /*
8  Defines a new stream: dout, for data logs.
9 */
10 
11 #include "DataStream.h"
12 #include "CollectionMgr.h"
13 #include "Vector.h"
14 #include "Tensor.h"
15 #include <stdio.h>
16 
17 /* output using CkPrintf() (end by inform) */
19  *this << std::ends;
20  std::string datastr = str();
21  CollectionMgr::Object()->sendDataStream(datastr.c_str());
22  str("");
23 }
24 
25 datastream& operator<<(datastream& strm, const Vector &v1) {
26  strm << v1.x << " " << v1.y << " " << v1.z;
27  return strm;
28 }
29 
30 datastream& operator<<(datastream& strm, const Tensor &t1) {
31  strm << t1.xx << " " << t1.xy << " " << t1.xz << " "
32  << t1.yx << " " << t1.yy << " " << t1.yz << " "
33  << t1.zx << " " << t1.zy << " " << t1.zz;
34  return strm;
35 }
36 
38 
static CollectionMgr * Object()
Definition: CollectionMgr.h:30
BigReal zy
Definition: Tensor.h:19
void endd()
Definition: DataStream.C:18
BigReal xz
Definition: Tensor.h:17
datastream dout
Definition: DataStream.C:37
Definition: Vector.h:64
BigReal z
Definition: Vector.h:66
BigReal yz
Definition: Tensor.h:18
datastream & operator<<(datastream &strm, const Vector &v1)
Definition: DataStream.C:25
BigReal yx
Definition: Tensor.h:18
BigReal x
Definition: Vector.h:66
BigReal xx
Definition: Tensor.h:17
BigReal zz
Definition: Tensor.h:19
Definition: Tensor.h:15
BigReal xy
Definition: Tensor.h:17
BigReal y
Definition: Vector.h:66
BigReal yy
Definition: Tensor.h:18
BigReal zx
Definition: Tensor.h:19
void sendDataStream(const char *)