8 #ifndef SRC_IO_OBSERVE_HH_ 9 #define SRC_IO_OBSERVE_HH_ 11 #include <boost/exception/info.hpp> 25 namespace Input {
namespace Type {
class Record; } }
38 : distance_(numeric_limits<double>::infinity()) {};
64 <<
"Failed to find the element containing the initial observe point.\n");
67 <<
"Failed to find the observe element with snap region: " << EI_RegionName::qval
68 <<
" close to the initial observe point. Change maximal distance of observe element." <<
"\n");
76 {
return observe_data_.element_idx_; }
82 {
return observe_data_.global_coords_; }
98 bool have_observe_element();
104 void snap(
Mesh &mesh);
119 void find_observe_point(
Mesh &mesh);
125 void output(ostream &out,
unsigned int indent_spaces,
unsigned int precision);
194 {
return observed_element_indices_;}
199 void output_header();
204 void output_time_frame(
double time);
224 template <
typename T>
225 ElementDataCache<T> & prepare_compute_data(std::string field_name,
double field_time,
unsigned int n_rows,
unsigned int n_cols);
259 bool no_fields_warning=
false;
std::vector< ObservePoint > points_
Full information about observe points.
double max_search_radius_
OutputDataFieldMap observe_field_values_
Stored field values.
std::ofstream observe_file_
Output file stream.
arma::vec3 input_point_
Input coordinates of the initial position of the observation point.
const std::vector< ObservePoint > & points() const
ObservePointData()
Constructor.
unsigned int element_idx_
Final element of the observe point. The index in the mesh.
std::string time_unit_str_
String representation of the time unit.
std::string observe_name_
arma::vec local_coords_
Local (barycentric) coordinates on the element.
Input::Record in_rec_
Index in the input array.
unsigned int element_idx() const
arma::vec3 global_coords_
Global coordinates of the observation point.
unsigned int precision_
Precision of float output.
std::string name_
Observation point name.
std::vector< unsigned int > observed_element_indices_
Elements of the o_points.
double observe_values_time_
Common evaluation time of the fields for single time frame.
const std::vector< unsigned int > & observed_elements() const
ObservePointData observe_data_
Helper object stored projection data.
double time_unit_seconds_
Time unit in seconds.
std::map< string, OutputDataPtr > OutputDataFieldMap
std::shared_ptr< ElementDataCacheBase > OutputDataPtr
arma::vec3 global_coords() const