Flow123d
release_2.2.0-20-gb8056ca
|
#include <observe.hh>
Public Member Functions | |
DECLARE_INPUT_EXCEPTION (ExcNoInitialPoint,<< "Failed to find the element containing the initial observe point.\n") | |
TYPEDEF_ERR_INFO (EI_RegionName, std::string) | |
TYPEDEF_ERR_INFO (EI_NLevels, unsigned int) | |
DECLARE_INPUT_EXCEPTION (ExcNoObserveElement,<< "Failed to find the observe element with snap region: "<< EI_RegionName::qval<< " close to the initial observe point. Using maximal number of neighbour levels: "<< EI_NLevels::val<< "\n") | |
unsigned int | element_idx () const |
arma::vec3 | global_coords () const |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
Protected Member Functions | |
ObservePoint () | |
ObservePoint (Input::Record in_rec, unsigned int point_idx) | |
void | update_projection (unsigned int i_elm, arma::vec local_coords, arma::vec3 global_coords) |
bool | have_observe_element () |
template<int ele_dim> | |
void | snap_to_subelement () |
void | snap (Mesh &mesh) |
void | find_observe_point (Mesh &mesh) |
void | output (ostream &out, unsigned int indent_spaces, unsigned int precision) |
Protected Attributes | |
Input::Record | in_rec_ |
Index in the input array. More... | |
std::string | name_ |
Observation point name. More... | |
arma::vec3 | input_point_ |
Input coordinates of the initial position of the observation point. More... | |
unsigned int | snap_dim_ |
string | snap_region_name_ |
unsigned int | max_levels_ |
unsigned int | element_idx_ |
Final element of the observe point. The index in the mesh. More... | |
arma::vec3 | global_coords_ |
Global coordinates of the observation point. More... | |
arma::vec | local_coords_ |
Local (barycentric) coordinates on the element. More... | |
double | distance_ |
Friends | |
class | Observe |
Only Observe should use this class directly. More... | |
Class representing single observe point, used internally by the class Observe. Members: input_pos_, snap_dim_, snap_region_name_ are set in constructor. Should be checked before passed in. Members: element_idx_, global_coords_, local_coords_ are derived, set in Observe::find_observe_points.
Definition at line 27 of file observe.hh.
|
protected |
Default constructor just for testing.
Definition at line 57 of file observe.cc.
|
protected |
Constructor. Read from input.
Definition at line 61 of file observe.cc.
ObservePoint::DECLARE_INPUT_EXCEPTION | ( | ExcNoInitialPoint | , |
<< "Failed to find the element containing the initial observe point.\n" | |||
) |
ObservePoint::DECLARE_INPUT_EXCEPTION | ( | ExcNoObserveElement | , |
<< "Failed to find the observe element with snap region: "<< EI_RegionName::qval<< " close to the initial observe point. Using maximal number of neighbour levels: "<< EI_NLevels::val<< "\n" | |||
) |
|
inline |
Return index of observation point in the mesh.
Definition at line 42 of file observe.hh.
|
protected |
Find the observe element and the definitive observe point.
Algorithm:
Definition at line 135 of file observe.cc.
|
static |
|
inline |
Return global coordinates of the observation point.
Definition at line 48 of file observe.hh.
|
protected |
Returns true if we have already found any observe element.
Definition at line 96 of file observe.cc.
|
protected |
Output the observe point information into a YAML formated stream, indent by given number of spaces + "- ".
Definition at line 260 of file observe.cc.
|
protected |
Snap to the center of closest subelement with dimension snap_dim_. This makes final adjustment of global_coords_ and local_coords_.
Definition at line 121 of file observe.cc.
|
protected |
Snap local coords to the subelement. Called by the snap method.
Definition at line 103 of file observe.cc.
ObservePoint::TYPEDEF_ERR_INFO | ( | EI_RegionName | , |
std::string | |||
) |
ObservePoint::TYPEDEF_ERR_INFO | ( | EI_NLevels | , |
unsigned | int | ||
) |
|
protected |
Update the observe element and the projection of the initial point on it.
Definition at line 82 of file observe.cc.
|
friend |
Only Observe should use this class directly.
Definition at line 144 of file observe.hh.
|
protected |
Distance of found projection from the initial point. If we find more candidates we pass in the closest one.
Definition at line 141 of file observe.hh.
|
protected |
Final element of the observe point. The index in the mesh.
Definition at line 131 of file observe.hh.
|
protected |
Global coordinates of the observation point.
Definition at line 134 of file observe.hh.
|
protected |
Index in the input array.
Definition at line 106 of file observe.hh.
|
protected |
Input coordinates of the initial position of the observation point.
Definition at line 112 of file observe.hh.
|
protected |
Local (barycentric) coordinates on the element.
Definition at line 137 of file observe.hh.
|
protected |
Maximal number of observe element search levels.
Definition at line 128 of file observe.hh.
|
protected |
Observation point name.
Definition at line 109 of file observe.hh.
|
protected |
Snap to the center of the object of given dimension. Value 4 and greater means no snapping.
Definition at line 118 of file observe.hh.
|
protected |
Region of the snapping element.
Definition at line 123 of file observe.hh.