Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
flowprobe Class Reference

#include <ProbeMon.H>

Inheritance diagram for flowprobe:
Collaboration diagram for flowprobe:

Public Types

enum  probedata {
  TIME =0, RHO, U, V,
  W, P, T, NPROBEDATA
}
 

Public Member Functions

 flowprobe ()
 
 flowprobe (const flowprobe &inFlowProbe)
 
void Clear ()
 
unsigned int ReadProbeData (std::istream &inStream)
 
void WriteData (std::ostream &outStream, bool writeLoc=false)
 
void SetLocation (double xLoc, double yLoc, double zLoc)
 

Protected Attributes

double locX
 
double locY
 
double locZ
 

Additional Inherited Members

- Public Attributes inherited from vector< T >
elements
 STL member. More...
 

Detailed Description

Definition at line 13 of file ProbeMon.H.

Member Enumeration Documentation

enum probedata
Enumerator
TIME 
RHO 
U 
V 
W 
P 
T 
NPROBEDATA 

Definition at line 16 of file ProbeMon.H.

Constructor & Destructor Documentation

flowprobe ( )
inline

Definition at line 17 of file ProbeMon.H.

References flowprobe::NPROBEDATA.

18  {
19  this->resize(NPROBEDATA);
20  };
flowprobe ( const flowprobe inFlowProbe)
inline

Definition at line 21 of file ProbeMon.H.

References flowprobe::NPROBEDATA, flowprobe::P, flowprobe::RHO, flowprobe::T, flowprobe::TIME, flowprobe::U, flowprobe::V, and flowprobe::W.

22  {
23  this->resize(NPROBEDATA);
24  (*this)[TIME] = inFlowProbe[TIME];
25  (*this)[RHO] = inFlowProbe[RHO];
26  (*this)[U] = inFlowProbe[U];
27  (*this)[V] = inFlowProbe[V];
28  (*this)[W] = inFlowProbe[W];
29  (*this)[P] = inFlowProbe[P];
30  (*this)[T] = inFlowProbe[T];
31  };

Member Function Documentation

void Clear ( )
inline

Definition at line 32 of file ProbeMon.H.

References flowprobe::NPROBEDATA.

Referenced by flowprobe::ReadProbeData().

33  {
34  this->resize(0);
35  this->resize(NPROBEDATA);
36  };

Here is the caller graph for this function:

unsigned int ReadProbeData ( std::istream &  inStream)
inline

Definition at line 37 of file ProbeMon.H.

References flowprobe::Clear(), flowprobe::P, flowprobe::RHO, flowprobe::T, flowprobe::TIME, cimg_library::cimg::time(), flowprobe::U, flowprobe::V, and flowprobe::W.

Referenced by main().

38  {
39  Clear();
40  std::string probeLine;
41  while(std::getline(inStream,probeLine)){
42  if(probeLine[0] == '#')
43  continue;
44  std::istringstream Instr(probeLine);
45  double time = 0;
46  double rho = 0;
47  double rhou = 0;
48  double rhov = 0;
49  double rhow = 0;
50  double press = 0;
51  double temp = 0;
52  Instr >> time >> rho >> rhou >> rhov >> rhow >> press >> temp;
53  (*this)[TIME].push_back(time);
54  (*this)[RHO].push_back(rho);
55  (*this)[U].push_back(rhou/rho);
56  (*this)[V].push_back(rhov/rho);
57  (*this)[W].push_back(rhow/rho);
58  (*this)[P].push_back(press);
59  (*this)[T].push_back(temp);
60  }
61  return((*this)[TIME].size());
62  };
void Clear()
Definition: ProbeMon.H:32
unsigned long time()
Get the value of a system timer with a millisecond precision.
Definition: CImg.h:4605

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLocation ( double  xLoc,
double  yLoc,
double  zLoc 
)
inline

Definition at line 76 of file ProbeMon.H.

References flowprobe::locX, flowprobe::locY, and flowprobe::locZ.

Referenced by main().

77  {
78  locX = xLoc;
79  locY = yLoc;
80  locZ = zLoc;
81  };
double locX
Definition: ProbeMon.H:81
double locY
Definition: ProbeMon.H:84
double locZ
Definition: ProbeMon.H:85

Here is the caller graph for this function:

void WriteData ( std::ostream &  outStream,
bool  writeLoc = false 
)
inline

Definition at line 63 of file ProbeMon.H.

References i, j, flowprobe::locX, flowprobe::locY, flowprobe::locZ, flowprobe::NPROBEDATA, and flowprobe::TIME.

Referenced by main().

64  {
65  unsigned int nTimes = (*this)[TIME].size();
66  for(unsigned int i = 0;i < nTimes;i++){
67  if(writeLoc){
68  outStream << locX << " " << locY << " " << locZ << " ";
69  }
70  for(unsigned int j = 0;j < NPROBEDATA;j++){
71  outStream << (*this)[j][i] << " ";
72  }
73  outStream << std::endl;
74  }
75  };
double locX
Definition: ProbeMon.H:81
double locY
Definition: ProbeMon.H:84
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6
double locZ
Definition: ProbeMon.H:85

Here is the caller graph for this function:

Member Data Documentation

double locX
protected

Definition at line 81 of file ProbeMon.H.

Referenced by flowprobe::SetLocation(), and flowprobe::WriteData().

double locY
protected

Definition at line 84 of file ProbeMon.H.

Referenced by flowprobe::SetLocation(), and flowprobe::WriteData().

double locZ
protected

Definition at line 85 of file ProbeMon.H.

Referenced by flowprobe::SetLocation(), and flowprobe::WriteData().


The documentation for this class was generated from the following file: