Flow123d
3.9.0-91c6c0b35
|
#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, const std::shared_ptr< TimeUnitConversion > &time_unit_conv) | |
~Observe () | |
Destructor, must close the file. More... | |
const std::vector< unsigned int > & | observed_elements () const |
void | output_header () |
void | output_time_frame (bool flush) |
const std::vector< ObservePoint > & | points () const |
const Distribution * | point_ds () const |
Range< ObservePointAccessor > | local_range () const |
Returns local range of observe points. More... | |
template<typename T > | |
ElementDataCache< T > & | prepare_compute_data (std::string field_name, double field_time, unsigned int n_rows, unsigned int n_cols) |
Protected Member Functions | |
void | flush_values () |
Effectively writes the data into the observe stream. More... | |
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... | |
std::vector< 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... | |
unsigned int | precision_ |
Precision of float output. More... | |
std::shared_ptr< TimeUnitConversion > | time_unit_conversion_ |
Time unit conversion object. More... | |
bool | no_fields_warning =false |
std::vector< LongIdx > | point_4_loc_ |
Index set assigning to local point index its global index. More... | |
Distribution * | point_ds_ |
Parallel distribution of observe points. More... | |
unsigned int | observe_time_idx_ |
Index of actual (last) time in observe_values_time_ vector. More... | |
Static Protected Attributes | |
static const unsigned int | max_observe_value_time = 1000 |
Maximal size of observe values times vector. More... | |
Friends | |
class | ObservePointAccessor |
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 198 of file observe.hh.
typedef std::map< string, OutputDataPtr > Observe::OutputDataFieldMap |
Definition at line 202 of file observe.hh.
typedef std::shared_ptr<ElementDataCacheBase> Observe::OutputDataPtr |
Definition at line 201 of file observe.hh.
Observe::Observe | ( | string | observe_name, |
Mesh & | mesh, | ||
Input::Array | in_array, | ||
unsigned int | precision, | ||
const std::shared_ptr< TimeUnitConversion > & | time_unit_conv | ||
) |
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 340 of file observe.cc.
Observe::~Observe | ( | ) |
Destructor, must close the file.
Definition at line 389 of file observe.cc.
|
protected |
Effectively writes the data into the observe stream.
Definition at line 440 of file observe.cc.
Range< ObservePointAccessor > Observe::local_range | ( | ) | const |
Returns local range of observe points.
Definition at line 496 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 223 of file observe.hh.
void Observe::output_header | ( | ) |
Output file header.
Definition at line 428 of file observe.cc.
void Observe::output_time_frame | ( | bool | flush | ) |
Sets next output time frame of observe. If the table is full, writes field values to the output file. Using the YAML format. Argument flush starts writing to output file explicitly.
Definition at line 469 of file observe.cc.
|
inline |
Return point distribution
Definition at line 246 of file observe.hh.
|
inline |
Return points_
vector
Definition at line 240 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 399 of file observe.cc.
|
friend |
Definition at line 314 of file observe.hh.
|
staticprotected |
Maximal size of observe values times vector.
Definition at line 274 of file observe.hh.
|
protected |
Definition at line 303 of file observe.hh.
|
protected |
Stored field values.
Definition at line 285 of file observe.hh.
|
protected |
Output file stream.
Definition at line 295 of file observe.hh.
|
protected |
Definition at line 292 of file observe.hh.
|
protected |
Index of actual (last) time in observe_values_time_
vector.
Definition at line 312 of file observe.hh.
|
protected |
Common evaluation time of the fields for single time frame.
Definition at line 289 of file observe.hh.
|
protected |
Elements of the o_points.
Definition at line 282 of file observe.hh.
|
protected |
Index set assigning to local point index its global index.
Definition at line 306 of file observe.hh.
|
protected |
Parallel distribution of observe points.
Definition at line 309 of file observe.hh.
|
protected |
Full information about observe points.
Definition at line 280 of file observe.hh.
|
protected |
Precision of float output.
Definition at line 298 of file observe.hh.
|
protected |
Definition at line 277 of file observe.hh.
|
protected |
Time unit conversion object.
Definition at line 300 of file observe.hh.