Flow123d  last_with_con_2.0.0-4-g42e6930
Public Member Functions | Protected Types | Protected Attributes | List of all members
Observe Class Reference

#include <observe.hh>

Collaboration diagram for Observe:
Collaboration graph
[legend]

Public Member Functions

 Observe (string observe_name, Mesh &mesh, Input::Array in_array, unsigned int precision)
 
 ~Observe ()
 Destructor, must close the file. More...
 
template<int spacedim, class Value >
void compute_field_values (Field< spacedim, Value > &field)
 
const std::vector< unsigned int > & observed_elements () const
 
void output_header (string observe_name)
 
void output_time_frame (double time)
 

Protected Types

typedef std::shared_ptr< OutputDataBaseOutputDataPtr
 
typedef std::map< string, OutputDataPtrOutputDataFieldMap
 

Protected Attributes

int rank_
 
Meshmesh_
 
std::vector< ObservePointpoints_
 Full information about observe points. More...
 
std::vector< unsigned int > observed_element_indices_
 Elements of the o_points. More...
 
OutputDataFieldMap observe_field_values_
 Stored field values. More...
 
double observe_values_time_
 Time of fields when the observe values were computed. More...
 
std::ofstream observe_file_
 Output file stream. More...
 
std::string time_unit_str_
 String representation of the time unit. More...
 
double time_unit_seconds_
 Time unit in seconds. More...
 
unsigned int precision_
 Precision of float output. More...
 

Detailed Description

This class takes care about the observe points in the output stream, storing observe values of the fields and their output in the YAML format.

Definition at line 142 of file observe.hh.

Member Typedef Documentation

typedef std::map< string, OutputDataPtr > Observe::OutputDataFieldMap
protected

Definition at line 197 of file observe.hh.

typedef std::shared_ptr<OutputDataBase> Observe::OutputDataPtr
protected

Definition at line 196 of file observe.hh.

Constructor & Destructor Documentation

Observe::Observe ( string  observe_name,
Mesh mesh,
Input::Array  in_array,
unsigned int  precision 
)

Construct the observation object.

observe_name - base name of the output file, the equation name. mesh - the mesh used for search for the observe points in_array - the array of observe points

Definition at line 225 of file observe.cc.

Observe::~Observe ( )

Destructor, must close the file.

Definition at line 255 of file observe.cc.

Member Function Documentation

template<int spacedim, class Value >
void Observe::compute_field_values ( Field< spacedim, Value > &  field)

Evaluates and store values of the given field in the observe points.

Definition at line 261 of file observe.cc.

const std::vector<unsigned int>& Observe::observed_elements ( ) const
inline

Provides a vector of element indices on which the observation values are evaluated. This can be used to evaluate derived fields only on these elements in the times not selected to full output.

Definition at line 169 of file observe.hh.

void Observe::output_header ( string  observe_name)

Output file header.

Definition at line 305 of file observe.cc.

Here is the caller graph for this function:

void Observe::output_time_frame ( double  time)

Write field values to the output file. Using the YAML format.

Definition at line 317 of file observe.cc.

Member Data Documentation

Mesh* Observe::mesh_
protected

Definition at line 189 of file observe.hh.

OutputDataFieldMap Observe::observe_field_values_
protected

Stored field values.

Definition at line 200 of file observe.hh.

std::ofstream Observe::observe_file_
protected

Output file stream.

Definition at line 207 of file observe.hh.

double Observe::observe_values_time_
protected

Time of fields when the observe values were computed.

Definition at line 204 of file observe.hh.

std::vector<unsigned int> Observe::observed_element_indices_
protected

Elements of the o_points.

Definition at line 194 of file observe.hh.

std::vector<ObservePoint> Observe::points_
protected

Full information about observe points.

Definition at line 192 of file observe.hh.

unsigned int Observe::precision_
protected

Precision of float output.

Definition at line 214 of file observe.hh.

int Observe::rank_
protected

Definition at line 186 of file observe.hh.

double Observe::time_unit_seconds_
protected

Time unit in seconds.

Definition at line 212 of file observe.hh.

std::string Observe::time_unit_str_
protected

String representation of the time unit.

Definition at line 210 of file observe.hh.


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