Flow123d
release_3.0.0-893-gf7bf019
|
#include <observe.hh>
Public Types | |
typedef std::shared_ptr< ElementDataCacheBase > | OutputDataPtr |
typedef std::map< string, OutputDataPtr > | OutputDataFieldMap |
Public Member Functions | |
Observe (string observe_name, Mesh &mesh, Input::Array in_array, unsigned int precision, std::string unit_str) | |
~Observe () | |
Destructor, must close the file. More... | |
const std::vector< unsigned int > & | observed_elements () const |
void | output_header () |
void | output_time_frame (double time) |
const std::vector< ObservePoint > & | points () const |
template<typename T > | |
ElementDataCache< T > & | prepare_compute_data (std::string field_name, double field_time, unsigned int n_rows, unsigned int n_cols) |
Protected Attributes | |
int | rank_ |
std::vector< ObservePoint > | points_ |
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_ |
Common evaluation time of the fields for single time frame. More... | |
std::string | observe_name_ |
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... | |
bool | no_fields_warning =false |
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 169 of file observe.hh.
typedef std::map< string, OutputDataPtr > Observe::OutputDataFieldMap |
Definition at line 173 of file observe.hh.
typedef std::shared_ptr<ElementDataCacheBase> Observe::OutputDataPtr |
Definition at line 172 of file observe.hh.
Observe::Observe | ( | string | observe_name, |
Mesh & | mesh, | ||
Input::Array | in_array, | ||
unsigned int | precision, | ||
std::string | unit_str | ||
) |
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 318 of file observe.cc.
Observe::~Observe | ( | ) |
Destructor, must close the file.
Definition at line 353 of file observe.cc.
|
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 193 of file observe.hh.
void Observe::output_header | ( | ) |
Output file header.
Definition at line 387 of file observe.cc.
void Observe::output_time_frame | ( | double | time | ) |
Write field values to the output file. Using the YAML format.
Definition at line 399 of file observe.cc.
|
inline |
Return points_
vector
Definition at line 209 of file observe.hh.
ElementDataCache< T > & Observe::prepare_compute_data | ( | std::string | field_name, |
double | field_time, | ||
unsigned int | n_rows, | ||
unsigned int | n_cols | ||
) |
Prepare data for computing observe values.
Method:
field_name | Quantity name of founding ElementDataCache |
field_time | Actual computing time |
n_rows | Count of rows of data cache (used only if new cache is created) |
n_cols | Count of columns of data cache (used only if new cache is created) |
Definition at line 359 of file observe.cc.
|
protected |
Definition at line 259 of file observe.hh.
|
protected |
Stored field values.
Definition at line 239 of file observe.hh.
|
protected |
Output file stream.
Definition at line 249 of file observe.hh.
|
protected |
Definition at line 246 of file observe.hh.
|
protected |
Common evaluation time of the fields for single time frame.
Definition at line 243 of file observe.hh.
|
protected |
Elements of the o_points.
Definition at line 236 of file observe.hh.
|
protected |
Full information about observe points.
Definition at line 234 of file observe.hh.
|
protected |
Precision of float output.
Definition at line 256 of file observe.hh.
|
protected |
Definition at line 231 of file observe.hh.
|
protected |
Time unit in seconds.
Definition at line 254 of file observe.hh.
|
protected |
String representation of the time unit.
Definition at line 252 of file observe.hh.